Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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) CreditAttribution: Anonymous commentedyes, this is a simple, useful addition. RTBC.
Comment #2
sdboyer CreditAttribution: 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) CreditAttribution: Anonymous commentednice, this is even more RTBCerer now.
Comment #4
alexpottI think we should add this to drupalPost too...
Comment #5
sdboyer CreditAttribution: sdboyer commentedgood point. new patch.
Comment #7
sdboyer CreditAttribution: sdboyer commented#5: dump-headers-2004908-5.patch queued for re-testing.
Comment #8
sdboyer CreditAttribution: sdboyer commentedreposting the same patch in the hopes that testbot pulls its head out of its rear.
Comment #9
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedRTBC once more. Also nicely shows the post fields.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedsdboyer++
Comment #11
catchCommitted/pushed to 8.x, thanks!