| Blockland Forums > Modification Help |
| Revenge of the TCP object [Solved] |
| << < (13/16) > >> |
| Kalphiter:
Please split it over a few lines, and don't put a space after \r\n. I also said it should end in \r\n\r\n |
| jes00:
--- Quote from: Kalphiter on May 08, 2012, 01:26:22 PM ---Please split it over a few lines, and don't put a space after \r\n. I also said it should end in \r\n\r\n --- End quote --- Like this: --- Code: ---%req = "GET /u/74047590/ColorSetMaker_Version.txt HTTP/1.1\r\n Host: dl.dropbox.com\r\n User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0\r\n Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n Accept-Language: en-us,en;q=0.5\r\n Connection: keep-alive\r\n If-None-Match: 23n\r\n\r\n"; --- End code --- It does end in \r\n\r\n |
| Kalphiter:
No, doing that will force a bunch of \n into the string, or whatever depending on your OS. Two ways you can do it %req = "xyz..."; %req = %req @"xyz..."; %req = %req @"xyz..."; or %req1 = "xyz..."; %req2 = "xyz..."; %req3 = "xyz..."; %req = %req1 @ %req2 @ %req3; |
| jes00:
--- Quote from: Kalphiter on May 08, 2012, 01:32:47 PM ---No, doing that will force a bunch of \n into the string, or whatever depending on your OS. Two ways you can do it %req = "xyz..."; %req = %req @"xyz..."; %req = %req @"xyz..."; or %req1 = "xyz..."; %req2 = "xyz..."; %req3 = "xyz..."; %req = %req1 @ %req2 @ %req3; --- End quote --- --- Code: --- %req1 = "GET /u/74047590/ColorSetMaker_Version.txt HTTP/1.1\r\n"; %req2 = "Host: dl.dropbox.com\r\n"; %req3 = "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0\r\n Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"; %req4 = "Accept-Language: en-us,en;q=0.5\r\n"; %req5 = "Connection: keep-alive\r\n"; %req6 = "If-None-Match: 23n\r\n\r\n"; %req = %req1 @ %req2 @ %req3 @ %req4 @ %req5 @ %req6; %this.send(%req); --- End code --- What? now it gets this result: 1: 2: 3: 8369 4: HTTP/1.1 304 NOT MODIFIED 1: 2: 3: 8369 4: Server: nginx/1.0.14 1: GMT 2: G 3: 8369 4: Date: Tue, 08 May 2012 17:47:09 GMT 1: 2: 3: 8369 4: Content-Type: text/plain; charset=ascii 1: 2: 3: 8369 4: Connection: keep-alive 1: 2: 3: 8369 4: etag: 23n 1: 2: 3: 8369 4: pragma: no-cache 1: 2: 3: 8369 4: cache-control: no-cache 1: 2: 3: 8369 4: |
| Kalphiter:
Take out the If-None-Match line |
| Navigation |
| Message Index |
| Next page |
| Previous page |