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

splitpath loses last character #1

Closed
TheOnlySilverClaw opened this issue Dec 20, 2016 · 2 comments
Closed

splitpath loses last character #1

TheOnlySilverClaw opened this issue Dec 20, 2016 · 2 comments

Comments

@TheOnlySilverClaw
Copy link

I just found out you're trying to revive Julia's webstack. Thank you for the effort. ;)

I guess I'll start helping out by finding bugs, since I seem to have a talent for that. It looks like splitpath fails to capture the last path character:

julia> uri = HTTP.URI("http://www.example.com/blah/blub?q=blub")
HTTP.URI("http://www.example.com/blah/blub?q=blub")

julia> HTTP.splitpath(uri)
2-element Array{String,1}:
"blah"
"blu"

@quinnj
Copy link
Member

quinnj commented Dec 20, 2016

Woohoo, first bug! I appreciate the feedback; definitely take things for a spin and let me know anything else you find. I'm finishing up some testing on asynchronous response streaming, so that would be good to get tested.

@quinnj quinnj closed this as completed in 1019b31 Dec 20, 2016
@quinnj
Copy link
Member

quinnj commented Dec 21, 2016

FWIW, I just committed some changes to make sure we can handle all sorts of request bodies (String, Vector{UInt8}, IO-types, etc.). We can also support "streaming" request bodies by starting an @async HTTP.post(...; body=f), where f is a HTTP.FIFOBuffer. You can then continue writing chunks to f, and then close it by doing HTTP.eof!(f). Check out the tests in test/client.jl to see more examples.

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