-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix close notify #2032
fix close notify #2032
Conversation
hrm... the test i'm writing will be a LOT easier with #2003. I'm trying to use netcat to capture the http request, but the version check goes first and i capture that instead... |
This surely fixes the closenotify problem, but not entirely obvious why. |
#2003 is currently on dev0.4.0 |
@rht the close notify issue appeared to be because the client was sending a malformed http request body. That caused the server side to mess up for some reason and not figure out how the close notify should happen for some reason. |
} else { | ||
// if we have no file data, use an empty Reader | ||
// (http.NewRequest panics when a nil Reader is used) | ||
reader = strings.NewReader("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this no longer true, then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was actually never true, as far as i can tell, at least since april 2014.
this LGTM in general. @whyrusleeping maybe write a proxy that checks the contents are fine, but still fwds the request to something else? not sure. |
I mean, if we want to have another bit of go code to do that we can. But at that point, we might as well just test it exclusively in go |
ok that's fine, as long as it is a real test (testing with the full api service running). fwiw, having a tool that can proxy + verify certain things pass through will be useful anyway. imagine something like: cat testfile
> grep ^Hello Server$
< grep ^Hello Client$
> grep ^Here are [0-9]+ things$
+> grep $Thing [0-9]+$
> grep ^Done$
< grep ^Ok got [0-9]+ things
cat testfile | testproxy --port 5679 1.2.3.4:5678 this may be overkill for now though :) |
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
0a6aeb4
to
41b89d2
Compare
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
LGTM |
this has been long in coming and is actively causing issues, merging. |
Our multipart file code cannot handle sending zero files. So if the number of input files is nil, don't do any multipart stuff.
Also did some other cleanup along the way to make debugging easier.