Bug #12432
HTTP return code is not being logged by CivetWeb
0%
Description
Description of problem:
Customer is looking to see the HTTP code that is returned to the client in the CivetWeb logs but all he gets is:
2015-07-14 17:24:28.354968 7f3bb67c4700 1 civetweb: 0x7f3bfc02b2c0:<ip Address> - - [14/Jul/2015:17:24:28 +0000] "GET / HTTP/1.0" -1 0 - -"
Version-Release number of selected component (if applicable):
Ceph Hammer
How reproducible:
Ceph Hammer and use Civetweb for RGW frontend
Steps to Reproduce:
Ceph Hammer and use Civetweb for RGW frontend
Actual results:
2015-07-14 17:24:28.354968 7f3bb67c4700 1 civetweb: 0x7f3bfc02b2c0:<ip address> - - [14/Jul/2015:17:24:28 +0000] "GET / HTTP/1.0" -1 0 - -"
Expected results:
Civetweb should display the HTTP return code in the log files.
Related issues
Associated revisions
rgw: set http status in civetweb
Need to set the http status in civetweb so that we report it correctly.
Fixes: #12432
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: set http status in civetweb
Need to set the http status in civetweb so that we report it correctly.
Fixes: #12432
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit b8e28ab9f914bf48c9ba4f0def9a0deb9dbb93bc)
History
#1 Updated by Yehuda Sadeh about 8 years ago
- Tracker changed from Tasks to Bug
- Project changed from Stable releases to rgw
- Priority changed from Normal to High
- Regression set to No
#2 Updated by Yuan Zhou about 8 years ago
I've traced the code, the http return code is printed:
https://github.com/ceph/civetweb/blob/master/src/civetweb.c#L6081
but it's always -1(the initial value). Looks like some bug in civetweb.
#3 Updated by Yehuda Sadeh about 8 years ago
I have a fix for that already, need to send a pull request.
#4 Updated by guanghui wang about 8 years ago
I have ask the developer of civetweb for this issues.
Here is the response.
[[https://github.com/bel2125/civetweb/issues/178]]
and now we have the way to modify the http return code in civetweb
but the callback.begin_request's return value may be modifyed.
[[https://github.com/bel2125/civetweb/commit/0e5206006cadb3145165e6beaa7768f84763a3c9]]
#5 Updated by Yehuda Sadeh about 8 years ago
- Status changed from New to Fix Under Review
- Assignee set to Orit Wasserman
#6 Updated by Ken Dreyer about 8 years ago
PR for master: https://github.com/ceph/ceph/pull/5445
#7 Updated by Ken Dreyer about 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
#8 Updated by Loïc Dachary about 8 years ago
- Status changed from Pending Backport to Resolved