Closed Bug 366712 Opened 18 years ago Closed 18 years ago

Need way to affect the headers that mochitest's server sends for a test

Categories

(Testing :: Mochitest, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bzbarsky, Unassigned)

References

Details

To test bug 200930, I need to be able to affect the headers the server sends (because some of the testing involves the Default-Style header)....
Depends on: 364043
Blocks: 200930
Blocks: 356280
Depends on: 367214
I just committed a fix for bug 367214, which should also fix this bug. To modify the HTTP headers/status of a file FOO, create a sibling file FOO^headers^ and set its content as follows: - to modify the HTTP status, the first line should be of the form "HTTP ### Description", where ### is the appropriate status (404, 500, etc.) and where "Description" is an arbitrary descriptive value; if you don't need to modify it, omit this line - if you need to modify an HTTP header, just add the appropriate line for it after the status line, if present Some examples of how this works may be found in the directory of tests for this functionality: http://lxr.mozilla.org/seamonkey/source/netwerk/test/httpserver/test/data/cern_meta/ This functionality is restricted only in that you can't set Server, Content-Length, or Date headers, because the server currently forces those headers to correct values for the generated response during post-processing. I anticipate this restriction going away eventually, but I don't think this will really be a problem for the immediate future. Also, for simplicity you can't set the same header twice and you can't format a header so it's multi-line, but neither of those restrict what you can do in any way whatsoever. Please file bugs for anything you find that doesn't work.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Do you want to toss the docs on devmo so they show up when people search? And thanks for doing this!
Moving a bunch of Core :: Testing bugs to Testing :: Mochitest to clear out the former, which is obsolete now that we have more specialized categories for such bugs; filter on the string "MochitestMmMm" to delete all these notifications.
Component: Testing → Mochitest
Product: Core → Testing
QA Contact: testing → mochitest
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.