Skip to content
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

ExpectContinue property #18

Open
spyteric opened this issue Oct 17, 2018 · 3 comments
Open

ExpectContinue property #18

spyteric opened this issue Oct 17, 2018 · 3 comments

Comments

@spyteric
Copy link

spyteric commented Oct 17, 2018

Env: hadoop 2.8.5
when use UploadFile() API,
hadoop will return "HTTP/1.1 100 Continue" before "HTTP/1.1 201 Created"
ExpectContinue need to be set true to get 201 otherwise EnsureSuccessStatusCode will throw an exception.

@risdenk
Copy link
Owner

risdenk commented Oct 17, 2018

What is the error you are getting when using the library?

@spyteric
Copy link
Author

spyteric commented Oct 18, 2018

When I use UploadFile()
An exception throw shows "HttpRequestException: Response status code does not indicate success: 100 (Continue)."

After look into, server return 100 continue before 201.

HTTP/1.1 100 Continue

HTTP/1.1 201 Created
Location: hdfs://localhost:9000/tmp/1.txt
Content-Length: 0
Connection: close

@risdenk
Copy link
Owner

risdenk commented Oct 18, 2018

Ah I see. I'm guessing this is without something like Apache Knox between your client and WebHDFS. I'm not sure if this is something where we can make sure we don't send the ExpectContinue header in the http client. I would hope the server doesn't just automatically return a "100 Continue" even if we don't ask for it. Can you put together a pull request to address the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants