View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001368 | Xdebug | Uncategorized | public | 2016-11-28 12:34 | 2016-11-28 18:34 |
Reporter | sebastian | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Platform | Irrelevant | OS | Irrelevant | OS Version | Irrelevant |
Product Version | 2.5.0RC1 | ||||
Summary | 0001368: xdebug_get_headers() does not include HTTP status headers | ||||
Description | The result of xdebug_get_headers() does not contain information about HTTP status code headers sent through header(): header('HTTP/1.0 404 Not Found'); Executing the code shown above yields the output shown below: /tmp/test.php:3: xdebug_get_headers() works as expected for headers that are not not related to HTTP status codes header('foo: bar'); Executing the code shown above yields the output shown below: /tmp/test.php:3: | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.1-dev | ||||
|
I have done some research, and when in PHP you use a status code line like this, it bypasses the normal setting of headers. As it doesn't go through the normal SAPI function, I can't hook into it. An alternative would be to overload the header() function and do it at that time. Because header() isn't the only function that sets headers (setcookie() and session handling do so too), this is going to get messy and potentially I am going to miss some. I therefore rather would not overload header(). Please reopen, if you have a better idea to solve this. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-11-28 12:34 | sebastian | New Issue | |
2016-11-28 15:46 | derick | Assigned To | => derick |
2016-11-28 15:46 | derick | Status | new => confirmed |
2016-11-28 18:34 | derick | Note Added: 0003805 | |
2016-11-28 18:34 | derick | Status | confirmed => resolved |
2016-11-28 18:34 | derick | Resolution | open => not fixable |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |