Rev 1203 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1203 | Rev 1348 | ||
|---|---|---|---|
| Line 30... | Line 30... | ||
| 30 | this.mySocket = new Socket(function(event, data) { self.socketCallback(event, data); }, urlData['hostname'], urlData['port'], 0); |
30 | this.mySocket = new Socket(function(event, data) { self.socketCallback(event, data); }, urlData['hostname'], urlData['port'], 0); |
| 31 | this.mySocket.start(); |
31 | this.mySocket.start(); |
| 32 | 32 | ||
| 33 | this.myRequest = "GET " + urlData['path'] + " HTTP/1.1\r\n"; |
33 | this.myRequest = "GET " + urlData['path'] + " HTTP/1.1\r\n"; |
| 34 | this.myRequest += "Host: " + urlData['hostname'] + ":" + urlData['port'] + "\r\n"; |
34 | this.myRequest += "Host: " + urlData['hostname'] + ":" + urlData['port'] + "\r\n"; |
| - | 35 | this.myRequest += "User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.2) Gecko/20090730 SUSE/3.5.2-1.1 Firefox/3.5.2\r\n"; |
|
| 35 | this.myRequest += "Connection: close\r\n"; |
36 | this.myRequest += "Connection: close\r\n"; |
| 36 | this.myRequest += "\r\n"; |
37 | this.myRequest += "\r\n"; |
| 37 | } |
38 | } |
| 38 | 39 | ||
| 39 | HTTP.prototype.parseUrl = function(url) |
40 | HTTP.prototype.parseUrl = function(url) |