Konstantin Lutovich
25888f0d83
Fix NPE in PreEncodedHttpField constructor ( #2488 )
...
Which might happen when given `HttpHeader` is null. It might be null
when most generic constructor `#PreEncodedHttpField(HttpHeader, String, String)`
is invoked with a null argument or when `#PreEncodedHttpField(String, String)`
constructor is used. Later is valuable for custom headers. NPE happens
because of an attempt to call `HttpHeader#asString()` on a null argument.
This commit fixes the problem by making encoders use specified header
name, instead of trying to retrieve it from the `HttpHeader` object.
Signed-off-by: lutovich <konstantin.lutovich@neo4j.com>
2018-04-26 08:35:24 +10:00
Jan Bartel
0e88849a68
Issue #2164 Make osgi.serviceloader mostly optional ( #2408 )
...
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-04-18 14:48:53 +10:00
Lachlan Roberts
4a0e4294b9
fixed path of MultiPartFormDataCompliance in jetty.xml
...
added some debug info
changes to jetty test webapp to display parts from multi-part forms
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-04 11:18:57 +10:00
Lachlan Roberts
379a8d6928
Merge remote-tracking branch 'eclipse/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart
2018-04-04 09:48:01 +10:00
Lachlan Roberts
1c35324f5b
Fixed some javadoc errors and warnings
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-04 09:46:50 +10:00
Greg Wilkins
6528b79fbd
Merge branch 'jetty-9.4.x-1027-Multipart' of github.com:eclipse/jetty.project into jetty-9.4.x-1027-Multipart
2018-04-04 08:08:59 +10:00
Joakim Erdfelt
3b32e1c984
Issue #1027 - MultiPartCaptureTest cleanup
...
+ Regenerated many of the captures
- Better SJIS Encoding Test Samples
+ Added more
- file consisting of only random whitespace
- file with 1 very long line
- Jetty Http Client captures
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-04-03 14:55:38 -05:00
Lachlan Roberts
1eec234336
Minor changes after review by gregw.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-03 21:22:16 +10:00
Lachlan Roberts
13b15e3566
Resolved Charset Issues and Reworked Request.MultiPartInputStream
...
Changed Request.MultiPartInputStream to an interface called MultiParts where there is an implementation for both the HTTP and UTIL parsers.
Resolved some issues with default charsets in regards to request.setCharacterEncoding and the _charset_ part for issue #2398 .
Changed HTTP parser to operate the same as UTIL parser in situtions with parts not of type form-data or without name field. HTTP parser was ignoring these parts, UTIL parser was throwing exceptions.
Replaced the context attribute with a field in MultiParts.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-03 15:24:54 +10:00
Lachlan Roberts
c418297db6
Minor cleanups
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-29 18:04:42 +11:00
Lachlan Roberts
8a8324cb18
Completed benchmark for UTIL vs HTTP multipart parser. Fixed some tests in MultiPartCaptureTest.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-29 16:29:48 +11:00
Lachlan Roberts
7cea305269
Added some extra Debug information in the LOG
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-27 16:47:21 +11:00
Lachlan Roberts
ba88b39179
Work on resolving issues with the new tests in MultiPartCaptureTest.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-27 15:43:16 +11:00
Lachlan Roberts
9557f02fea
Fixed converstion to lower case by using StringUtil.asciiToLowerCase method.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-27 12:02:10 +11:00
Greg Wilkins
ba56bc7994
Deprecated transfer encoding for parts
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-27 11:55:20 +11:00
Greg Wilkins
a756ac50c6
Use UTF-8 for part headers
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-27 11:45:38 +11:00
Greg Wilkins
6ac5970680
renamed test
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-27 10:32:13 +11:00
Greg Wilkins
585f03464b
Merge remote-tracking branch 'lachlan/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart
2018-03-27 10:29:05 +11:00
Greg Wilkins
a59f681b00
run old and new parser in test
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-27 10:10:55 +11:00
Lachlan Roberts
ce3698ea75
Merge remote-tracking branch 'eclipse/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart
2018-03-27 09:19:47 +11:00
Lachlan Roberts
ca534d08fb
Minor changes to code, documentation and formatting after review.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-27 09:11:57 +11:00
Greg Wilkins
8416c31ff8
compare MH5 hash without case sensitivity
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-27 08:33:07 +11:00
Greg Wilkins
2f07940052
compare MH5 hash without case sensitivity
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-23 10:18:03 +11:00
Greg Wilkins
2cc26f0e71
Merge branch 'jetty-9.4.x' into jetty-9.4.x-1027-Multipart
2018-03-23 09:34:52 +11:00
Joakim Erdfelt
9d1809f43e
Issue #1027 - Adding raw browser multipart captures to jetty-http
...
+ Many more decoding issues identified in MultiPartParsingTest
+ Including Part.getInputStream() related issues
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-22 13:24:47 -05:00
Joakim Erdfelt
2004f0eb78
Issue #1027 - Adding jetty-http version of newer MultiPartParsingTest
...
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-22 10:21:57 -05:00
Greg Wilkins
8312f4567b
Merge branch 'jetty-9.4.x' into jetty-9.4.x-1027-Multipart
2018-03-21 16:50:29 +11:00
Lachlan Roberts
0f28107a9c
Implemented warnings for old MultiPartInputStreamParser when successfully parsing content not conforming to RFC.
...
Modified tests in new MultiPartInputStreamTest which were failing because they didn't comply with RFC.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-21 16:24:21 +11:00
Joakim Erdfelt
c3cc138a3b
Updating to version 9.4.10-SNAPSHOT
2018-03-20 08:25:59 -05:00
Joakim Erdfelt
1f8159b1e4
Updating to version 9.4.9.v20180320
2018-03-20 07:18:24 -05:00
Lachlan Roberts
93b8161afb
Reworked MultipartParser with additional option to accept CR as CRLF.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-20 11:40:55 +11:00
Lachlan Roberts
0ce3ccd4eb
Merge remote-tracking branch 'eclipse/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart
2018-03-18 22:05:29 +11:00
Lachlan Roberts
df83cca010
Rewrote the parse method to use the MultiPartParser, some error handling not implemented so only passing half of the tests.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-18 21:53:54 +11:00
Greg Wilkins
a5d3b01659
Merge branch 'jetty-9.4.x' into jetty-9.4.x-1027-Multipart
2018-03-14 16:25:56 +11:00
Lachlan Roberts
fcd2d49da1
Moved a copy of MultipartInputStreamParser and MultipartInputStreamTest into jetty.http
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-14 15:51:43 +11:00
Greg Wilkins
a77a127da0
tests and fixes for binary keys and content
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-14 15:02:56 +11:00
Lachlan Roberts
4dce09c067
Completed the split test.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-14 14:27:03 +11:00
Greg Wilkins
c1f038d3bf
Merge branch 'jetty-9.4.x' into jetty-9.4.x-2232-HttpParser-cleanup
2018-03-14 09:32:51 +11:00
Joakim Erdfelt
7374d6563d
Merge branch 'jetty-9.4.x' of github.com:eclipse/jetty.project into jetty-9.4.x
2018-03-13 14:24:57 -05:00
Joakim Erdfelt
aafda1a279
Issue #2280 - adding default utf-8 encoding to application/json
2018-03-13 14:24:37 -05:00
Lachlan Roberts
20c9fb45f8
Reworked the tests on EPILOGUE and multiple content. All tests are passing.
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-13 20:21:10 +11:00
Greg Wilkins
faa32f0c71
improved handler signature
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 18:25:32 +11:00
Lachlan Roberts
d670b60e4d
Merge remote-tracking branch 'eclipse/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-13 17:58:53 +11:00
Lachlan Roberts
a51542ee03
work in progress EPILOGUE and END states implemented, in process of testing them
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-13 17:52:57 +11:00
Greg Wilkins
46a8fb5dc4
fixes for partial pattern matches and optional CRLF
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 17:40:26 +11:00
Lachlan Roberts
0435eea708
work in progress implemented OCTETS
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-13 16:13:07 +11:00
Greg Wilkins
915af401e1
HttpParser cleanup #2232
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 13:22:01 +11:00
Lachlan Roberts
0d4e202343
Merge remote-tracking branch 'eclipse/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart
2018-03-13 11:49:00 +11:00
Lachlan Roberts
66a76dae3c
work in progress
...
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-13 11:48:41 +11:00
Greg Wilkins
267150c940
cleanup field parsing
...
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 11:09:14 +11:00