/irc-logs / w3c / #testing / 2013-08-08 / end

Options:

  1. # Session Start: Thu Aug 08 00:00:01 2013
  2. # Session Ident: #testing
  3. # [00:01] * Joins: tobie (tobie@public.cloak)
  4. # [00:02] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
  5. # [00:14] <jgraham> I guess it also means that you can't put a delay in to the headers
  6. # [00:14] <jgraham> So you can't do
  7. # [00:14] <jgraham> Content-Type: text/html
  8. # [00:14] <jgraham> [sleep 2s]
  9. # [00:15] <jgraham> Content-Type: text/plain
  10. # [00:15] <jgraham> Does anyone care about that?
  11. # [00:15] <jgraham> I think if they do we probably need to start from scratch
  12. # [00:16] * jgraham feels he might be talking to himself
  13. # [00:17] * Quits: tobie (tobie@public.cloak)
  14. # [00:18] * Joins: tobie (tobie@public.cloak)
  15. # [00:26] * Quits: tobie (tobie@public.cloak)
  16. # [01:13] * Joins: zcorpan (~zcorpan@public.cloak)
  17. # [01:20] * Quits: zcorpan (~zcorpan@public.cloak) (Ping timeout: 180 seconds)
  18. #
  19. # Session Start: Thu Aug 08 10:06:47 2013
  20. # Session Ident: #testing
  21. # [10:06] * Now talking in #testing
  22. # [10:11] * Quits: tobie (tobie@public.cloak)
  23. # [10:28] * heycam is now known as heycam|away
  24. # [10:38] * Quits: glenn_ (~gadams@public.cloak) (Client closed connection)
  25. # [11:00] <gsnedders> Releasing tests shouldn't be this hard. Problems: fourth level directories; bottom level directories referring to @id of specific algorithms.
  26. # [11:03] <darobin> jgraham: I have no idea how those Python things are architected, but can't you get at the socket from the http server instance?
  27. # [11:04] <darobin> I haven't checked this through, but for instance in Node the ultra basic HTTP server exposes a connection field which I believe you can just highjack and write to
  28. # [11:08] <gsnedders> darobin: With WSGI, no, you get a far higher-level request object.
  29. # [11:09] <darobin> gsnedders: I was thinking of the SimplerHTTPServer (?) thing
  30. # [11:09] <darobin> I reckon I should look myself, I've survived reading Python docs before :)
  31. # [11:10] <gsnedders> SimpleHTTPServer.
  32. # [11:10] <gsnedders> http.server in Py3.
  33. # [11:10] <gsnedders> darobin: That gives raw access to the socket, yes.
  34. # [11:11] <darobin> that might do the trick, assuming it doesn't forcefully try to make a response for you
  35. # [11:11] <gsnedders> No, it doesn't.
  36. # [11:11] <darobin> and even then I'm sure we can subclass it
  37. # [11:11] <gsnedders> Somewhere I have something…
  38. # [11:11] <darobin> so that might look like a solution to the issues that jgraham was having during the night
  39. # [11:12] <gsnedders> http://hg.gsnedders.com/http-parsing/file/bbab4a6298d7/tests/response/response.py
  40. # [11:12] <gsnedders> This basically just sends an .asis (sp?) file down
  41. # [11:12] <gsnedders> Python 2 only, but could easily be changed.
  42. # [11:13] <darobin> gsnedders: that looks pretty good to me
  43. # [11:13] <darobin> hahaha
  44. # [11:14] <darobin> if self.request_version == 'HTTP/0.9': self.send_error(505, "HTTP Version Not Supported")
  45. # [11:14] <darobin> I don't think HTTP 0.9 had 505 as a response code :)
  46. # [11:14] <darobin> not that it matters of course
  47. # [11:14] <gsnedders> No, it didn't. :)
  48. # [11:14] <gsnedders> (But it's perfectly normal to send HTTP/1.0 responses to HTTP/0.9 requests, seemingly!)
  49. # [11:14] <darobin> well it's HTTP, anything pretty much fucking goes really
  50. # [11:15] <gsnedders> Except if you're IIS 7+. Then you're really strict.
  51. # [11:15] <darobin> it's part of what makes it truly wonderful that the web works at all
  52. # [11:15] <darobin> heh
  53. # [11:15] <gsnedders> Server's can get away with being a lot more strict.
  54. # [11:15] <gsnedders> No diversity of clients, really.
  55. # [11:15] <gsnedders> And no really broken ones.
  56. # [11:16] <darobin> oooh, that really depends
  57. # [11:16] <darobin> for browsers, sure
  58. # [11:16] <darobin> but once you start serving stuff for consumption by other clients (typically, a simple JSON API) you get really surprising stuff
  59. # [11:17] <darobin> e.g. a fixed a bug a few weeks ago where a client was sending a content-type for a request with an empty body — it confused the hell out of the server
  60. # [11:17] <gsnedders> In my experience you never got stuff remotely as weird as what you got from servers.
  61. # [11:17] <gsnedders> Yeah, that's not bizzare at all.
  62. # [11:17] <darobin> I reckon that's true
  63. # [11:18] <darobin> the problem with servers is that they're often built of many parts that can interact strangely
  64. # [11:20] <gsnedders> CGI scripts esp.
  65. # [11:20] <gsnedders> The headers they send are pretty much untouched.
  66. # [12:19] * Joins: abarsto (~abarsto@public.cloak)
  67. # [12:19] * abarsto is now known as ArtB
  68. # [13:23] * Joins: darobin_ (rberjon@public.cloak)
  69. # [13:26] * heycam|away is now known as heycam
  70. # [13:28] * heycam is now known as heycam|away
  71. # [13:28] * Quits: darobin (rberjon@public.cloak) (Ping timeout: 180 seconds)
  72. # [13:43] * Joins: bhill1 (~Brad@public.cloak)
  73. # [13:48] * Quits: bhill (~Brad@public.cloak) (Ping timeout: 180 seconds)
  74. # [13:53] * Joins: dom (dom@public.cloak)
  75. # [14:28] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
  76. # [14:34] * darobin_ is now known as darobin
  77. # [16:24] <jgraham> Yes, I think just subclassing BaseHTTPServer and implementing something that has the exact behaviour we want should be fine
  78. # [16:31] <jgraham> My idea so far is to allow serving normal files, with matching .headers files to add or remove custom headers (I'm not sure if only exact matches should be considered, or we should also walk up the tree), .asis files that are sent as is (possibly with the option to disable the standard headers that the server would send) and .py files which allow (through some undetermined API) you to set status headers and body simply in common cases but also allow yo[CUT]
  79. # [16:31] <jgraham> ... pause in the response after writing part of the status line
  80. # [16:34] <gsnedders> paste.httpserver uses BaseHTTPServer, no? So it might be simplest to just use WSGI for .py files?
  81. # [16:35] <jgraham> WSGI still doesn't give you the ability to not send expected headers
  82. # [16:35] <jgraham> Or to fiddle with the timing of things before the headers
  83. # [16:35] <jgraham> s/headers/body/
  84. # [16:36] <gsnedders> And so is wsgiref.simple_server.
  85. # [16:36] <gsnedders> I thought we were allowing asis to do that? Or you want pauses as well as expected headers?
  86. # [16:37] * gsnedders is unconvinced he actually understands all the requirements here
  87. # [16:37] <gsnedders> (And he's probably missed some others)
  88. # [16:37] <jgraham> Well, it seems like if pauses are useful in the body they are useful in the headers too
  89. # [16:37] <jgraham> I'm not sure I know all the requirements
  90. # [16:38] <jgraham> But I had the original idea that "full control over the bytes and timing of the response" was a requirement
  91. # [16:38] <gsnedders> Because I'm pretty sure for most tests using Python you don't want to have to worry about that much detail
  92. # [16:39] <jgraham> That's obviously possible if you just expose the socket, but it's not a nice API for the common case
  93. # [16:39] <jgraham> Exactly
  94. # [16:39] <gsnedders> Most tests using Python you'll just want, "okay, send these headers, and here's the body". I worry that we're going to end up with something overcomplex for the common case.
  95. # [16:39] <jgraham> I don't think so
  96. # [16:40] <jgraham> I am very aware that the common case should be as simple as possible
  97. # [16:41] <gsnedders> Do we really want to come up with an entirely custom API?
  98. # [16:41] <jgraham> It's not clear that it has to be "entirely custom"
  99. # [16:42] <jgraham> For example, a good API might be "write a function that returns a string or an iterable or a function or a Response object"
  100. # [16:43] <jgraham> If you return a string or an iterable all the headers are taken care of (I guess you need to provide Content-type and status somehow)
  101. # [16:44] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
  102. # [16:44] * Quits: ArtB (~abarsto@public.cloak) (Client closed connection)
  103. # [16:45] <jgraham> If you return a response object you can set some options to turn off default headers, or provide a function that will write headers, or whatever
  104. # [16:45] <jgraham> That isn't a full proposal and I see holes
  105. # [16:46] <jgraham> But the idea is that there can be a graduated level of difficulty from "server does almost everything" to "server does almost nothing"
  106. # [16:46] <gsnedders> BTW, do you know why WSGI/Web3 uses a list for headers?
  107. # [16:47] <jgraham> As opposed to a dict?
  108. # [16:47] <gsnedders> Yeah.
  109. # [16:47] <jgraham> Not really. Maybe to preserve order?
  110. # [16:48] <gsnedders> I dunno. Maybe the fact that de-facto (though not de-jure) Content-Type: foo/bar\r\nContent-Type: bar/foo cannot be compressed into one heade.r
  111. # [16:53] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
  112. # [16:54] <darobin> I reckon that a good way of listing the requirements is to go through all the PHP we have and see what it does
  113. # [16:55] <darobin> what I've looked at is mostly straightforward
  114. # [17:04] <gsnedders> jgraham: My proposal would be something along the lines of staying as close to WSGI as possible, I think, so a wrapped for WSGI would be trivial.
  115. # [17:07] <gsnedders> Make the raw socket available for writing to, otherwise provide a sendResponseLine(code, message) and a sendHeader(name, value), as well as sendBody(data)
  116. # [17:07] <gsnedders> And they all write immediately (can we force it to flush to the socket?), so you can interweve sleeps.
  117. # [17:16] <jgraham> darobin: Certianly I have seen uses of PHP for test writing that were not straightforward
  118. # [17:17] <darobin> let's collect and see
  119. # [17:17] <darobin> note that I said "mostly" :)
  120. # [17:17] <jgraham> And there are tests that have gone unwritten because they were not possible to implement in PHP
  121. # [17:17] <jgraham> Or not easy at least
  122. # [17:17] <jgraham> Those are the ones that we don't know about
  123. # [17:17] <jgraham> s/don't/can't/
  124. # [17:18] <darobin> yeah, sure, I'm not saying it'll give 100% of requirements
  125. # [17:18] <darobin> but it should give a good idea
  126. # [17:18] <jgraham> gsnedders: Yeah, I will hopfully get to write some code for this in the next couple of days (not sure how busy I am with other things), so I will start and see what feels natural
  127. # [17:20] * Quits: Lachy (~Lachy@public.cloak) ("Computer has gone to sleep.")
  128. # [17:20] <gsnedders> Cool. Will have a look… at some point.
  129. # [17:21] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
  130. # [18:09] * Quits: dom (dom@public.cloak) ("")
  131. # [18:09] * Joins: abarsto (~abarsto@public.cloak)
  132. # [18:09] * abarsto is now known as ArtB
  133. # [18:26] * Joins: Lachy (~Lachy@public.cloak)
  134. # [18:26] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
  135. # [18:27] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
  136. # [18:29] * Joins: rhauck (~Adium@public.cloak)
  137. # [18:29] * Quits: rhauck (~Adium@public.cloak) ("Leaving.")
  138. # [18:30] * Joins: rhauck (~Adium@public.cloak)
  139. # [18:32] * Joins: zcorpan (~zcorpan@public.cloak)
  140. # [18:32] * Quits: rhauck (~Adium@public.cloak) ("Leaving.")
  141. # [18:39] * Quits: zcorpan (~zcorpan@public.cloak) (Ping timeout: 180 seconds)
  142. # [19:23] <jgraham> Writing code is fun
  143. # [19:33] <jgraham> He says as he responds to some email
  144. # [19:38] * Joins: tobie (tobie@public.cloak)
  145. # [19:47] * Joins: jhammel (~jhammel@public.cloak)
  146. # [19:53] * Joins: zcorpan (~zcorpan@public.cloak)
  147. # [20:04] * Joins: rhauck (~Adium@public.cloak)
  148. # [21:18] * Quits: tobie (tobie@public.cloak)
  149. # [21:21] * Joins: tobie (tobie@public.cloak)
  150. # [21:51] * Quits: jhammel (~jhammel@public.cloak) (Ping timeout: 180 seconds)
  151. # [21:55] * Joins: jhammel (~jhammel@public.cloak)
  152. # [22:20] * heycam|away is now known as heycam
  153. # [22:34] * Quits: tobie (tobie@public.cloak)
  154. # [22:43] * Joins: gitbot (~gitbot@public.cloak)
  155. # [22:43] -gitbot:#testing- [web-platform-tests] AFBarstow opened pull request #269: README.md for the WebSocket API test suite (master...master) https://github.com/w3c/web-platform-tests/pull/269
  156. # [22:43] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
  157. # [22:44] * Quits: Ms2ger (~Ms2ger@public.cloak) ("nn")
  158. # [22:48] * Joins: gitbot (~gitbot@public.cloak)
  159. # [22:48] -gitbot:#testing- [web-platform-tests] AFBarstow synchronize pull request #269: README.md for the WebSocket API test suite (master...master) https://github.com/w3c/web-platform-tests/pull/269
  160. # [22:48] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
  161. # [22:53] * Joins: gitbot (~gitbot@public.cloak)
  162. # [22:53] -gitbot:#testing- [web-platform-tests] plehegar synchronize pull request #181: Submissions/navigationtiming (master...submissions/navigationtiming) https://github.com/w3c/web-platform-tests/pull/181
  163. # [22:53] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
  164. # [22:58] * Joins: gitbot (~gitbot@public.cloak)
  165. # [22:58] -gitbot:#testing- [web-platform-tests] plehegar closed pull request #269: README.md for the WebSocket API test suite (master...master) https://github.com/w3c/web-platform-tests/pull/269
  166. # [22:58] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
  167. # [22:58] * Joins: gitbot (~gitbot@public.cloak)
  168. # [22:58] -gitbot:#testing- [web-platform-tests] plehegar pushed 3 new commits to master: https://github.com/w3c/web-platform-tests/compare/6c699833e0ff...78613c1c4c2d
  169. # [22:58] -gitbot:#testing- web-platform-tests/master b848ad3 Arthur Barstow: README.md for the WebSocket API test suite
  170. # [22:58] -gitbot:#testing- web-platform-tests/master 5024ad5 Arthur Barstow: Fix typo in URL of the Editor Draft
  171. # [22:58] -gitbot:#testing- web-platform-tests/master 78613c1 Philippe Le Hegaret: Merge pull request #269 from AFBarstow/master...
  172. # [22:58] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
  173. # [23:07] * Joins: rhauck1 (~Adium@public.cloak)
  174. # [23:08] * Quits: Lachy (~Lachy@public.cloak) ("Computer has gone to sleep.")
  175. # [23:09] * Joins: rhauck2 (~Adium@public.cloak)
  176. # [23:09] * Quits: rhauck1 (~Adium@public.cloak) (Client closed connection)
  177. # [23:10] * Joins: gitbot (~gitbot@public.cloak)
  178. # [23:10] -gitbot:#testing- [web-platform-tests] AFBarstow opened pull request #270: README.md for the HTML5 Web Messaging test suite (master...master) https://github.com/w3c/web-platform-tests/pull/270
  179. # [23:10] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
  180. # [23:14] * Quits: rhauck (~Adium@public.cloak) (Ping timeout: 180 seconds)
  181. # [23:17] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
  182. # [23:27] * Joins: Lachy (~Lachy@public.cloak)
  183. # [23:37] * Quits: ArtB (~abarsto@public.cloak) ("Leaving.")
  184. # [23:40] * Quits: jhammel (~jhammel@public.cloak) (Ping timeout: 180 seconds)
  185. # [23:45] * Joins: jhammel (~jhammel@public.cloak)
  186. # [23:50] * Quits: rhauck2 (~Adium@public.cloak) ("Leaving.")
  187. # [23:50] * Joins: rhauck (~Adium@public.cloak)
  188. # [23:51] * heycam is now known as heycam|away
  189. # [23:53] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
  190. # [23:53] * Joins: rhauck1 (~Adium@public.cloak)
  191. # [23:54] * Quits: rhauck (~Adium@public.cloak) (Client closed connection)
  192. # [23:59] * Joins: tobie (tobie@public.cloak)
  193. # Session Close: Fri Aug 09 00:00:00 2013

The end :)