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

WIP: Factorisation of implementation into modules and layers #135

Merged
merged 188 commits into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
d572554
Replace FIFOBuffer implementation with BufferStream/IOBuffer wrapper.
samoconnor Nov 4, 2017
9f01226
Rename canonicalize!(::String) -> tocameldash!(::String)
samoconnor Nov 21, 2017
8d8841e
Remove URI, header and body size limits from parser.
samoconnor Nov 22, 2017
fabde09
Replace unused parser option "lenient" with global const "strict".
samoconnor Nov 22, 2017
1b4aee0
Parser simplification
samoconnor Nov 22, 2017
f7ba394
Add tests for parsing one charactar at a time. Fix #125 and #126.
samoconnor Nov 22, 2017
2dd90a8
Store method, major, minor, url and status in Parser - begin to separ…
samoconnor Nov 22, 2017
bb120bd
Use Vector{Pair} instead of Dict for Headers. See #108.
samoconnor Nov 27, 2017
f20fcb3
Use IOBuffer instead of Vector{UInt8} for field and value buffers in …
samoconnor Nov 27, 2017
35dfe80
reduce main parse! function to a single method by keeping a reference…
samoconnor Nov 27, 2017
ce9d6ae
Remove *_mark from Parser.
samoconnor Nov 28, 2017
b1eebe8
Remove (mostly) unused Parser.nread field
samoconnor Nov 28, 2017
7e0d643
Explicitly return HPE_OK (not errno) in Parser in places where there is
samoconnor Nov 28, 2017
2bf357e
Clean up gotos and main loop condition in parser
samoconnor Nov 28, 2017
602d7ed
Replace @debug(PARSING_DEBUG, ParsingStateCode(p_state)) in every ifelse
samoconnor Nov 28, 2017
c3194c0
Merge branch 'buffer_stream_branch' into simplify_parser_branch
samoconnor Nov 28, 2017
770247f
Move header and body procssing out of parser (via callbacks)
samoconnor Nov 28, 2017
ac46ca2
throw message incomplete error from parse()
samoconnor Nov 29, 2017
5af3f19
move upgrade flag to Parser struct so that state is preserved between…
samoconnor Nov 29, 2017
175819e
throw ArgumentError for zero len passed to parse!
samoconnor Nov 29, 2017
5d3ffa1
simplify ParsingError display
samoconnor Nov 29, 2017
f788921
Replace multiple status var returned by parse!() with state accessor
samoconnor Nov 29, 2017
70a8373
Merge remote-tracking branch 'origin/master' into simplify_parser_branch
samoconnor Nov 29, 2017
aaf8e5d
replace "while true" read loop in client with "while !eof(socket)" loop
samoconnor Nov 29, 2017
8f49465
throw errors directly from parse!()
samoconnor Nov 29, 2017
5febfb8
Call show(r) for verbose logging and write(r) for comms.
samoconnor Nov 29, 2017
dbb1bae
fix parse error when fragmentation splits CRLF
samoconnor Nov 29, 2017
9accb0b
simple debug macro
samoconnor Dec 6, 2017
77ba528
function absuri(u::URI, context::URI)
samoconnor Dec 7, 2017
ebced40
parser interface tweaks in server (untested)
samoconnor Dec 7, 2017
87775ee
Work in progress. Separation of client functionality into layers.
samoconnor Dec 7, 2017
9f1756c
Added closeread/closewrite interface to manage pooling/interleaving.
samoconnor Dec 8, 2017
89b4f19
Add high level client interfaces
samoconnor Dec 9, 2017
573867f
Move default port (80/443) to getconnection.
samoconnor Dec 10, 2017
be4bc91
simplify Base.print(io::IO, u::URI), just print string directly
samoconnor Dec 10, 2017
602ed98
simplify Base.print(io::IO, u::URI), just print string directly
samoconnor Dec 10, 2017
8f031c1
Split util functions into: Pairs.jl, Stirngs.jl, debug.jl, parseutils.jl
samoconnor Dec 10, 2017
8b57b6f
debug tweaks
samoconnor Dec 11, 2017
cf9c03d
tweak import of MbedTLS.SSLContext
samoconnor Dec 11, 2017
57224d1
Update client.jl API to use refactored internals.
samoconnor Dec 11, 2017
1a2b4ae
improve show(io::IO, c::Connection)
samoconnor Dec 11, 2017
6167fa6
Parsers.jl cleanup
samoconnor Dec 11, 2017
40e56eb
doc examples
samoconnor Dec 11, 2017
aa8f232
Architecture and Internal Interface Documentation
samoconnor Dec 12, 2017
9ae07c5
Whoops
samoconnor Dec 12, 2017
11f90a4
Split stack furthur into seperate modules.
samoconnor Dec 12, 2017
946e35d
more refinement of layer separation, doc updates
samoconnor Dec 13, 2017
ea0a9c9
note that header functions are case-insensitive
samoconnor Dec 13, 2017
808b577
doc typos
samoconnor Dec 13, 2017
4b601f5
Cache Parser in ConnectionPool.
samoconnor Dec 13, 2017
fe07a9b
simplify Base.read!(::IO, ::Parser) per https://github.com/JuliaWeb/M…
samoconnor Dec 13, 2017
dc95c38
fix prior broken commit
samoconnor Dec 13, 2017
0a654eb
test/REQUIRE JSON
samoconnor Dec 13, 2017
3a79361
fix for syntax: unexpected "catch" on 0.7
samoconnor Dec 13, 2017
b3625f8
temporarily limit travis to v0.6/linux
samoconnor Dec 14, 2017
a4e13a4
Ensure that all old client.jl keyword options are handeled or produce a
samoconnor Dec 14, 2017
fd7c97d
Revert rename of parser.jl -> Parsers.jl to avoid making GitHub's diff
samoconnor Dec 14, 2017
024a5a5
tweaks to "minimal" configuration
samoconnor Dec 16, 2017
388433c
fix connection pool locking for concurrent access to same connection
samoconnor Dec 16, 2017
d17d851
Parser tweaks
samoconnor Dec 16, 2017
b928fe0
cosmetics
samoconnor Dec 16, 2017
6b6b16e
add state and status to ParsingError. Handle eof() before message has…
samoconnor Dec 16, 2017
c22a7cc
fix read/write locks in ConnectionPool.jl
samoconnor Dec 16, 2017
7ad1d73
typo in @err macro
samoconnor Dec 17, 2017
b02c8da
add note about header fragmentation
samoconnor Dec 17, 2017
67ac47a
ConnectionPool scheme refinement.
samoconnor Dec 17, 2017
21ca900
HTTP.jl
samoconnor Dec 19, 2017
d5af224
Merge remote-tracking branch 'origin/master' into simplify_parser_branch
samoconnor Dec 19, 2017
9457bf8
v0.7 compat
samoconnor Dec 19, 2017
4319b2b
remove old async test, see new test/async.jl
samoconnor Dec 19, 2017
fe2243c
v0.7 updates
samoconnor Dec 19, 2017
16836f6
remove unreachable state s_dead
samoconnor Dec 19, 2017
2fcc81e
split parse! into parseheaders! and parsebody!
samoconnor Dec 19, 2017
dbc37df
add readbody! and readheaders!
samoconnor Dec 20, 2017
17d080f
API notes
samoconnor Dec 20, 2017
5f13213
API notes
samoconnor Dec 20, 2017
f547a28
API notes
samoconnor Dec 20, 2017
5aa1b0b
More extreme async and streaming tests: async.jl
samoconnor Dec 26, 2017
f6867ca
Merge remote-tracking branch 'origin/master' into simplify_parser_branch
samoconnor Dec 26, 2017
c3f8253
Move request() function from RequestStack module to top-level HTTP mo…
samoconnor Dec 26, 2017
531d36a
whoops
samoconnor Dec 26, 2017
3e0d7a6
More async streaming tests (and resulting bug-fixes)
samoconnor Dec 27, 2017
d7155d1
whoops
samoconnor Dec 27, 2017
f78324a
whoops
samoconnor Dec 27, 2017
10d8b82
whoops
samoconnor Dec 27, 2017
36e871f
need eof bugfix in +MbedTLS 0.5.2
samoconnor Dec 29, 2017
b6114c7
tweak AWS4AuthRequest.jl debug levels
samoconnor Dec 29, 2017
6813d54
DEBUG_LEVEL = 0 by default
samoconnor Dec 29, 2017
090148d
added lockedby() to compat.jl
samoconnor Dec 29, 2017
cd54d0f
type annotation
samoconnor Dec 29, 2017
28dc704
type annotation
samoconnor Dec 29, 2017
ebbe960
cosmetics
samoconnor Dec 29, 2017
0d1056a
reenstate verbose= option
samoconnor Dec 29, 2017
16084d0
ConnectionPool.jl enhancements.
samoconnor Dec 29, 2017
a241651
test tweaks
samoconnor Dec 29, 2017
701d2f4
added TimeoutLayer
samoconnor Dec 29, 2017
21b942e
Concurrency enhancements to Handle RFC7230 6.5, early termination.
samoconnor Dec 30, 2017
80043ee
typo
samoconnor Dec 31, 2017
0f5a32a
ConnectionPool eof() handle closed Transaction.
samoconnor Dec 31, 2017
8666274
fix pipline_limit off-by-one, add +Base.close(c::Connection) = Base.c…
samoconnor Dec 31, 2017
901004f
more variation of parameters in test/async.jl
samoconnor Dec 31, 2017
8e69738
Add test/WebSockets.jl to test connection upgrade.
samoconnor Jan 2, 2018
03c6a03
Ignore 100 Continue message in startread(http::HTTPStream)
samoconnor Jan 2, 2018
7511663
Test for 100-continue
samoconnor Jan 2, 2018
d5e4038
MUST NOT automatically retry a request with a non-idempotent method
samoconnor Jan 2, 2018
6a7e1fa
fix deadlock when no conncetion duplication is allowed
samoconnor Jan 2, 2018
7c89d28
https://tools.ietf.org/html/rfc7230#section-6.3.2
samoconnor Jan 2, 2018
279e807
Fix isrecoverable()/isidempotent() bug
samoconnor Jan 2, 2018
6acaee2
Add loopback test for abort while sending body (& fix bugs)
samoconnor Jan 3, 2018
b7a1eb7
dont set chunked header when upgrade header is set
samoconnor Jan 3, 2018
343d860
add tests for pipeline_limit and duplicate_limit
samoconnor Jan 3, 2018
6dd2807
Pass Content-Length:0 to S3 GET in tests to avoid automatic chunked h…
samoconnor Jan 3, 2018
d34e9e1
added tests for no pipelinging after non-idempotent
samoconnor Jan 3, 2018
f44d68d
Fix for closed connections stuck in pool.
samoconnor Jan 3, 2018
1cfdd96
loopback test connection pool cleanup
samoconnor Jan 3, 2018
a42f1d6
close before purge in close(c::Connection)
samoconnor Jan 3, 2018
2e4e4ed
Set Content-Length: 0 by default for iofunction GET requests
samoconnor Jan 3, 2018
15232fd
tweak delays in loopback test to remove race conditions
samoconnor Jan 3, 2018
27d665b
dont run AWS S3 tests if creds ENV not set
samoconnor Jan 3, 2018
a4ed450
whoops
samoconnor Jan 3, 2018
941c6e6
docstring cleanup, work in progress
samoconnor Jan 3, 2018
704264d
arch doc
samoconnor Jan 4, 2018
3c94232
Doc cleanup
samoconnor Jan 6, 2018
7507bbb
fix !minima/minimal bug in stack()
samoconnor Jan 6, 2018
38cf9c6
Doc cleanup.
samoconnor Jan 7, 2018
5e0dade
Remove Connect.jl module.
samoconnor Jan 8, 2018
128a33b
doc updates
samoconnor Jan 8, 2018
c1d2b35
typo
samoconnor Jan 8, 2018
422c8f5
Fix show(::IOError).
samoconnor Jan 8, 2018
25e2af9
handlers tweaks for compatibility with HTTP.Request
samoconnor Jan 10, 2018
eabeab7
remove redundant connectionclosed(p::Parser), replaced by hasheader(h…
samoconnor Jan 10, 2018
969f438
added @ensure to debug.jl
samoconnor Jan 10, 2018
dd5b23a
remove unneeded abbeviation of request to req
samoconnor Jan 10, 2018
2c9fee6
added hasheader(::Message, key, value)
samoconnor Jan 10, 2018
4345a9c
ConnectionPool and HTTP.Stream tweaks for server mode compatibility.
samoconnor Jan 10, 2018
d032905
cosmatics
samoconnor Jan 10, 2018
16f28ee
WIP integrating connection pipelining and HTTP.Stream with server.jl
samoconnor Jan 10, 2018
a2419c9
Add HTTP.listen server API
samoconnor Jan 11, 2018
e17f7ad
Parser cleanup post "Connection: Upgrade" testing.
samoconnor Jan 11, 2018
133b5dd
Remove commented out dead code.
samoconnor Jan 11, 2018
2aad8ca
add Base.readbytes!(t::Transaction, a::Vector{UInt8}, nb::Int)
samoconnor Jan 11, 2018
250b6ea
Messages.jl
samoconnor Jan 11, 2018
e0d900a
Revise Streams.jl to bypass parser for non-chunked bodies.
samoconnor Jan 11, 2018
97409a9
use ConnectionPool.byteview conveniance fn in Base.readavailable(http…
samoconnor Jan 11, 2018
fa38054
Remove redundant header interpretation from Parser.
samoconnor Jan 11, 2018
9b5191f
https://github.com/JuliaWeb/HTTP.jl/pull/135#pullrequestreview-88370194
samoconnor Jan 12, 2018
09a508c
https://github.com/JuliaWeb/HTTP.jl/pull/135#pullrequestreview-88370960
samoconnor Jan 12, 2018
058e2e4
doc tweak
samoconnor Jan 12, 2018
2acab09
typo
samoconnor Jan 12, 2018
cb9ad32
https://github.com/JuliaWeb/HTTP.jl/pull/135#pullrequestreview-88372788
samoconnor Jan 12, 2018
499b752
doc fix
samoconnor Jan 12, 2018
cb1b850
doc tweaks
samoconnor Jan 12, 2018
bb96146
doc tweak
samoconnor Jan 12, 2018
c02b21b
remove redundant import in Messages.jl
samoconnor Jan 12, 2018
a8f4f73
typos, and add escapepath to URIs module
samoconnor Jan 12, 2018
e32604b
Rename Nitrogren -> Servers
samoconnor Jan 12, 2018
aa792e5
0.6 tweaks
samoconnor Jan 12, 2018
ea97668
update README
samoconnor Jan 12, 2018
5bc54e5
Merge https://github.com/samoconnor/HTTP.jl/pull/1
samoconnor Jan 13, 2018
a53ba48
compat for Val
samoconnor Jan 13, 2018
8bb14bd
compat for Val
samoconnor Jan 13, 2018
235879c
IOExtras.closeread::Stream{Request} fix for server mode
samoconnor Jan 13, 2018
4d6f94d
Add http://localhost:8081 server for ConnectionPool debug.
samoconnor Jan 13, 2018
6c10abc
https://github.com/JuliaLang/julia/pull/25479
samoconnor Jan 13, 2018
396dca5
latest v0.7 master compat tweaks
samoconnor Jan 13, 2018
8b9ffcf
move STATUS_CODES const to Messages.jl (only place it is used) and us…
samoconnor Jan 13, 2018
13503ab
Don't include consts.jl in top level HTTP namespace
samoconnor Jan 13, 2018
934b4de
Server doc updates
samoconnor Jan 13, 2018
cc76f4f
untested integration of Server and serve with listen
samoconnor Jan 13, 2018
3d5fc58
FIXME
samoconnor Jan 13, 2018
b7ce63c
Add MicroLogging for Windows v0.6
EricForgy Jan 13, 2018
37e9bb1
Rename handlers.jl to Handlers.jl
EricForgy Jan 13, 2018
a6bcb4b
Merge pull request #2 from EricForgy/simplify_parser_branch
samoconnor Jan 13, 2018
831e64e
Merge pull request #3 from EricForgy/patch-8
samoconnor Jan 13, 2018
b263d13
untested implementation of HTTP.serve() calling HTTP.listen()
samoconnor Jan 13, 2018
25944c8
Server integration and tests.
samoconnor Jan 14, 2018
cb4a894
oops
samoconnor Jan 14, 2018
1df2227
disable extra debug printf in test/server.jl
samoconnor Jan 14, 2018
b2b5a14
Return status 413 for too-large headers.
samoconnor Jan 14, 2018
be69847
randomise server port number in tests
samoconnor Jan 14, 2018
6d978be
iso8859_1_to_utf8 per #141
samoconnor Jan 14, 2018
aff5cac
typo
samoconnor Jan 15, 2018
61e197d
Naming consistancy tweaks.
samoconnor Jan 15, 2018
6c6dfbb
update tests and compat
samoconnor Jan 15, 2018
7d92068
try to fix Inexact Error in win32
samoconnor Jan 15, 2018
d27163c
Update @ensure macro to print values of failed comparison.
samoconnor Jan 16, 2018
b6ea4c7
Add postconditions to URI(;kw...) and parse(::URI, ...) to ensure
samoconnor Jan 16, 2018
23dab21
handle asterix-form Request Target https://tools.ietf.org/html/rfc723…
samoconnor Jan 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
.DS_Store
*.key
*.crt
*.swp
docs/build/
docs/site/
docs/site/
Loading