robbyrob42 / forceworkbench

Automatically exported from code.google.com/p/forceworkbench
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Extra Lines in HTTP Post Breaking with Jetty #583

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a bug in the workbench tool. When this tool makes a HTTP-POST 
submission to an application server, there are extra empty line(s) in the 
header section. According to the HTTP protocol, no empty line is allowed in the 
header section. In fact, the first empty line in the entire submission 
separates the header section and the body section. Because these extra empty 
line(s), part of the header section is being treated as the body section. The 
missing header fields caused the original error of this bug (missing 
content-length header value). 

Resin server somehow tolerates these empty line(s), however, Jetty App server 
does not. 

I believe the extra empty line(s) are due to the "\n" character of each line 
inside the "Request Headers" input box (click the "Headers" button to see this 
input box) is not being stripped off. 

------------------- an example of http POST submission made from the workbench 
tool (note the empty line in the header section --------------------- 
POST /services/data/v24.0/chatter/feeds/news/me/feed-items HTTP/1.1 
Host: ytan-wsl.internal.salesforce.com:1111 
Accept-Encoding: gzip 
Authorization: OAuth XXXX 
User-Agent: Workbench/24.0.0i 
X-PrettyPrint: true 
Content-Type: application/json; charset=UTF-8 

Accept: application/json 
Content-Length: 172 

{ "body" : 
{ 
"messageSegments" : [ 
{ 
"type": "Text", 
"text" : "Here is a simple test post" 
} 
] 
} 
}

Original issue reported on code.google.com by ryan.bra...@gmail.com on 20 Jul 2012 at 5:41

GoogleCodeExporter commented 9 years ago

Original comment by ryan.bra...@gmail.com on 20 Jul 2012 at 11:09

GoogleCodeExporter commented 9 years ago
Fixed in d63018462d49d874d0e4fde0a2ed0184da89275a   Ryan Brainard   Today 6:19 PM

Original comment by ryan.bra...@gmail.com on 5 Aug 2012 at 5:23

GoogleCodeExporter commented 9 years ago
Released in 25.0.0

Original comment by ryan.bra...@gmail.com on 10 Aug 2012 at 4:32