For certain tests, it's useful to be able to inspect the headers being sent in response to get requests (we're needing this over in #1984766: Change notice: Start relying on Request/Response objects for cache handling, for example). This patch adds support for automatically dumping headers via the verbose() method when a new $dumpHeaders property is set to TRUE. it defaults to FALSE in WebTestBase.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | dump-headers-2004908-5.patch | 3.46 KB | sdboyer |
| #5 | dump-headers-2004908-5.patch | 3.46 KB | sdboyer |
| #5 | interdiff.txt | 2.01 KB | sdboyer |
| #2 | dump-headers-2004908-2.patch | 1.92 KB | sdboyer |
| #2 | header-dump.png | 71.66 KB | sdboyer |
Comments
Comment #1
Anonymous (not verified) commentedyes, this is a simple, useful addition. RTBC.
Comment #2
sdboyer commentedsorry, just tweaked this a bit to make the output more readable (trimmed header strings). here's how it looks:
Comment #3
Anonymous (not verified) commentednice, this is even more RTBCerer now.
Comment #4
alexpottI think we should add this to drupalPost too...
Comment #5
sdboyer commentedgood point. new patch.
Comment #7
sdboyer commented#5: dump-headers-2004908-5.patch queued for re-testing.
Comment #8
sdboyer commentedreposting the same patch in the hopes that testbot pulls its head out of its rear.
Comment #9
Niklas Fiekas commentedRTBC once more. Also nicely shows the post fields.
Comment #10
Anonymous (not verified) commentedsdboyer++
Comment #11
catchCommitted/pushed to 8.x, thanks!