File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/com/epam/reportportal/util/test Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
## [ Unreleased]
4
+ ### Fixed
5
+ - No body request handling in ` SocketUtils.ServerCallable ` , by @HardNorth
4
6
5
7
## [ 0.0.11]
6
8
### Fixed
Original file line number Diff line number Diff line change @@ -80,10 +80,14 @@ public List<String> call() throws Exception {
80
80
if (headers .isEmpty ()) {
81
81
throw new IOException ("No headers received from client" );
82
82
}
83
- int lengthIdx =
84
- headers .indexOf (CONTENT_LENGTH_HEADER ) + CONTENT_LENGTH_HEADER .length (); // Find the Content-Length header
85
- int contentLength = Integer .parseInt (headers .substring (lengthIdx , headers .indexOf (System .lineSeparator (), lengthIdx ))
86
- .trim ());
83
+
84
+ int contentLength = 0 ;
85
+ int lengthIdx = headers .indexOf (CONTENT_LENGTH_HEADER );
86
+ if (lengthIdx > 0 ) {
87
+ lengthIdx += CONTENT_LENGTH_HEADER .length ();
88
+ contentLength = Integer .parseInt (headers .substring (lengthIdx , headers .indexOf (System .lineSeparator (), lengthIdx ))
89
+ .trim ());
90
+ }
87
91
if (contentLength > 0 ) {
88
92
char [] body = new char [contentLength ];
89
93
int actualRead = in .read (body , 0 , contentLength );
You can’t perform that action at this time.
0 commit comments