CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.78k stars 680 forks source link

Error parsing HTTP status line when there is no reason phrase #2846

Closed avialluri closed 2 years ago

avialluri commented 3 years ago

If there is no reason phrase (OK) in HTTP status line the following error is thrown during the call to CheckFileInfo: wsd-17022-17044 2021-07-12 16:58:59.290312 [ docbroker_001 ] ERR StatusLine::parse: missing line break| net/HttpRequest.cpp:289 This worked in 6.4.9 - 0b3211b , but is failing with 6.4.10 version.

To Reproduce Steps to reproduce the behavior:

  1. Access a fileId . This will trigger the call to CheckFileInfo
  2. Make sure the response does not have the reason phrase : i.e only HTTP/1.1 200 (reason phrase OK is missing above..which is what tomcat 9.x + will return)
  3. HttpRequest.cpp fails with the above error message. This worked in 6.4.9 - 0b3211b , but is failing with 6.4.10 version.
  4. See error wsd-17022-17044 2021-07-12 16:58:59.290312 [ docbroker_001 ] ERR StatusLine::parse: missing line break| net/HttpRequest.cpp:289 wsd-17022-17044 2021-07-12 16:58:59.290444 [ docbroker_001 ] ERR WOPI::CheckFileInfo (31ms) failed or no valid JSON payload returned. Access denied. Original response: [].| wsd/Storage.cpp:786

Expected behavior CheckFileInfo gets the json data and able to parse and continue succesfully

Actual behavior CheckFileInfo fails with the above error message (it does have json payload but fails due to the HTTP status line parse issue)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

---------- Headers in response from CheckFileInfo: HTTP/1.1 200 Set-Cookie: JSESSIONID=5308B30917BCD4CF201FCB495FA59282; Path=/xyz; HttpOnly Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Date: Mon, 12 Jul 2021 17:49:42 GMT

jiandanfeng commented 3 years ago

I am facing the same issue with 6.4.10 version.

Ashod commented 2 years ago

This has been fixed and released several weeks back. Please reopen / open a new ticket if any issues are still observed. Thanks!