Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #146 from Keno/pull-request/55a7bf96
Browse files Browse the repository at this point in the history
Fix Requests on 0.6
  • Loading branch information
malmaud authored Jan 31, 2017
2 parents 79469c3 + 55a7bf9 commit 67c3bf6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/multipart.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function prepare_multipart_request!(request, files)
chunked = true
end

datasizes = Array(Int,length(files))
datasizes = Array{Int}(length(files))

# Try to determine final size of the request. If this fails,
# we fall back to chunked transfer
Expand Down
2 changes: 1 addition & 1 deletion src/parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ end

function on_body(parser, at, len)
response_stream = pd(parser)
append!(response_stream.buffer.data, unsafe_wrap(Array, convert(Ptr{UInt8}, at), (len,)))
write(response_stream.buffer, unsafe_wrap(Array, convert(Ptr{UInt8}, at), (len,)))
response_stream.buffer.size = length(response_stream.buffer.data)
response_stream.state = OnBody
notify(response_stream.state_change)
Expand Down
4 changes: 2 additions & 2 deletions src/streaming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ function ResponseStream{T}(response, socket::T)
r.response = response
r.socket = socket
r.state = NotStarted
r.buffer = IOBuffer()
r.buffer = IOBuffer(UInt8[], true, true, true, true, typemax(Int))
r.parser = ResponseParser(r)
r.timeout = Inf
r.current_header = Nullable()
r.state_change = Condition()
r.cookie_buffer = IOBuffer()
r.cookie_buffer = IOBuffer(UInt8[], true, true, true, true, typemax(Int))
r
end

Expand Down

0 comments on commit 67c3bf6

Please sign in to comment.