| 12:53 | <gsnedders> | anyone able to be conned into writing some JavaScript for the HTTP parsing test suite? |
| 12:56 | <Philip`> | What is that likely to involve? |
| 14:07 | <gsnedders> | Philip`: Loading files from one folder, then checking that the headers/body/status match up with a JSON file in another folder (where the two files are related by filename) |
| 14:07 | <gsnedders> | http://hg.gsnedders.com/cgi-bin/hgwebdir.cgi/http-parsing/file/c550df97477b/tests/response/ shows the basic structure of the files |
| 15:35 | <Philip`> | gsnedders: How is it meant to determine the headers/body/status? |
| 15:35 | <Philip`> | (Using XHR, I guess) |
| 15:35 | <Philip`> | (since I can't think of any alternatives) |
| 15:36 | <Philip`> | gsnedders: How is it meant to know which files to load? |
| 16:52 | <gsnedders> | Philip`: Yeah, XHR. I guess the best would be to load /tests and use getElementsByTagName('a') |
| 16:53 | <gsnedders> | Philip`: (then assume the filenames in /expected have the extension .expected instead of .http) |
| 17:25 | <Philip`> | gsnedders: Ah, okay |
| 17:25 | <Philip`> | Why not write it yourself? :-) |
| 17:26 | <gsnedders> | Philip`: Because I suck and I've already wasted ages failing :) |
| 17:26 | <gsnedders> | (or rather, my knowledge of JS in general is minimal) |
| 17:41 | <Philip`> | gsnedders: Ah, fair enough :-) |
| 17:45 | <gsnedders> | Philip`: I'd say I'd add you to the list of contributors in the spec if you helped, but there again, you're already there :) |
| 17:58 | <hsivonen> | the current wikitruth about HTML5 does not acknowledge APIs |
| 18:18 | <Philip`> | gsnedders: It seems not entirely easy to test HTTP header parsing with XHR, because getAllResponseHeaders is largely undefined and inconsistently implemented |
| 18:18 | <gsnedders> | Philip`: surely getResponseHeader() would be easier? |
| 18:19 | <hsivonen> | I keep refinding issues that I've already reported... |
| 18:19 | <hsivonen> | ins/del datetime syntax this time |
| 18:19 | <Philip`> | gsnedders: Then the .expected format would have to be able to say that it expects a certain header to not exist |
| 18:20 | <gsnedders> | Philip`: some headers are created by the UA though, like the cache ones, in my experience |
| 18:20 | <Philip`> | (so you can test that things don't get misinterpreted as headers when they shouldn't) |
| 18:21 | <gsnedders> | Philip`: but surely some other header value or the body will be wrong? |
| 18:26 | <Philip`> | gsnedders: If you have "HTTP/1.0 200 OK\r\nSome-Garbage\r\nContent-Type: text/html\r\n\r\nBody" then I guess maybe the Some-Garbage would just get ignored, and wouldn't affect anything else, and the tests should check there isn't a parsed header named "Some-Garbage" |
| 18:26 | <gsnedders> | Philip`: ah. true. |
| 18:26 | <Philip`> | but maybe that's not too important |
| 18:27 | <Philip`> | but getAllResponseHeaders is useless anyway so there's not much choice |
| 18:32 | <gsnedders> | Philip`: does getResponseHeader() consistently return null when it doesn't exist? |
| 18:32 | <gsnedders> | (where it == the header) |
| 18:34 | <Philip`> | gsnedders: No - looks like FF returns null, IE/Opera return "" |
| 18:34 | <gsnedders> | ergh. |
| 18:34 | <gsnedders> | Could use that to check, but if that isn't consistent either. |
| 18:35 | hsivonen | tries to document the time element "vague" datetime format in one paragraph... |
| 18:35 | Philip` | wonders if XHR getResponseHeader uses the same HTTP parser as the rest of the browser engine does |
| 18:36 | <Philip`> | (given that IE's getAllResponseHeaders returns the originl raw HTTP header string, so it has at least some kind of lower-level hook) |
| 18:36 | <Philip`> | +a |
| 18:37 | <gsnedders> | Philip`: in IE and Opera, yes. In Fx it does for some headers, and not for others, IIRC. |
| 18:38 | <Philip`> | Hmm, is it impossible to do multiline createTextNode? IE requires "\r" and treats "\n" like a space, but FF requires "\n" and ignores a lone "\r" |
| 18:39 | <Philip`> | (...inside <pre>, in particular) |
| 18:39 | <hsivonen> | whoa. the vague time format sucks |
| 18:40 | <gsnedders> | (IIS and IE don't use the same HTTP parser, though, BTW) |
| 18:43 | <gsnedders> | Philip`: when does your term end, BTW? |
| 18:43 | <hsivonen> | gsnedders: did you send feedback about the time formats as part of your microsyntax review? I don't see your messages in the WHATWG issue folder |
| 18:43 | <gsnedders> | hsivonen: no, I never got around to doing them |
| 18:43 | <hsivonen> | gsnedders: ok |
| 18:48 | <Philip`> | gsnedders: Is something like http://canvex.lazyilluminati.com/misc/http-test-runner.patch vaguely useful? |
| 18:50 | <Philip`> | gsnedders: I don't really do terms now, since I've stopped being an undergraduate, so I can go home whenever I want as long as nobody minds :-) |
| 18:51 | gsnedders | is forgetting too much |
| 18:51 | <gsnedders> | Philip`: yeah |
| 18:51 | <Philip`> | (That is, as long as nobody minds who is important enough that I mind them minding) |
| 18:55 | gsnedders | thanks Philip` loads :P |
| 18:57 | Philip` | hopes his code isn't too horribly broken |
| 19:17 | gsnedders | hasn't tried running it yet |
| 19:17 | gsnedders | hopes Philip` did |
| 19:22 | gsnedders | wonders if the Connection header should be case sensitive |
| 19:22 | <hsivonen> | occasionally one has to wonder how this Web thing works at all |
| 19:35 | <mpt> | It's like an ogre |
| 21:13 | <gsnedders> | Onions are like ogres. They both have layers. |
| 21:15 | <mpt_> | That's what I was referring to, yes |
| 21:15 | <gsnedders> | I guessed :) |