Commit Graph

12 Commits (4fd7fb9d40cdbcbe560a5b6e261a292f0cf46246)

Author SHA1 Message Date
Ariya Hidayat 93dd478370 Merge pull request #185 from Roejames12/master
Last changes
2011-12-21 08:37:14 -08:00
Ariya Hidayat 5528c046db Some API changes in the WebServer module.
Trying to match http://nodejs.org/docs/latest/api/http.html.

For the server response:

  * Change writeBody to write
  * Change writeHeaders to writeHead

For the request object, 'headers' is now an object containing all
key-value pairs of the actual HTTP headers.

'queryString' is folded into 'url' key.

Non-standard keys in the request: isSSL, remotePort, remoteIP,
remoteUser, are disabled in the mean-time (will be revisited after 1.4
release).

Implementation-wise, the request object is now a simple key-value pair
using QVariant, as opposed to the heavy QObject instance.

http://code.google.com/p/phantomjs/issues/detail?id=115
2011-12-19 18:38:21 -08:00
IceArmy c8f45c2d15 Replace more unused variables with _ 2011-12-13 13:09:34 -08:00
IceArmy 930f6f1bcc Fix bug where port number wasn't 0 if listen failed. 2011-12-05 09:29:56 -08:00
IceArmy 7567752d2b Don't send body or content-length header under certain conditions
We have to include this check for the content-length header (since it's auto generated), however, the script is supposed to take care of not sending any message body; but we've taken care of that anyways, to conform a little more to standards.
2011-12-04 22:44:39 -08:00
IceArmy 18e9575f9d Update comments for patched function 2011-12-04 22:01:54 -08:00
IceArmy 5c176eb32a Fix bug where when using sendError, headers were sent again, causing headers to show in the body
Also did a much nicer job of cleaning up the code
2011-12-04 19:18:54 -08:00
IceArmy d9bb34b257 Oops! That should be a str, not int. 2011-12-04 17:56:14 -08:00
IceArmy 2cc3f636bc WebServer can send error pages with a simple call 2011-12-04 15:25:01 -08:00
IceArmy 02fe5f6018 Add hooks to webserver.py 2011-12-04 09:41:54 -08:00
IceArmy 235611ec2f Do a little cleanup
Improved CaseInsensitiveDict a little.
Added some more messages for the method patch.
Added a break in a for loop
2011-12-03 23:04:08 -08:00
IceArmy b3a589aaa7 This is the basic web server functionality.
http://code.google.com/p/phantomjs/issues/detail?id=115
2011-12-02 16:02:52 -08:00