1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00
This commit is contained in:
psyc://psyced.org/~lynX 2009-04-22 05:47:45 +02:00
parent 7672aaa476
commit 426d2f7c8f

View file

@ -38,14 +38,18 @@ int buffer_content(string all);
string qHost() { return thehost; } string qHost() { return thehost; }
void fetch(string murl) { void fetch(string murl) {
// why just once? this breaks twitter/* if (url != murl) {
//if (url) return;
// accept.c does this for us: // accept.c does this for us:
//url = replace(murl, ":/", "://"); //url = replace(murl, ":/", "://");
// so we can use this method also in a normal way // so we can use this method also in a normal way
url = murl; url = murl;
// resource may need to be re-parsed (other params)
resource = 0;
// re-parse the hostname?
//thehost = port = 0;
}
P3(("%O: fetch(%O)\n", ME, url)) P3(("%O: fetch(%O)\n", ME, url))
connect(); unless (fetching) connect();
} }
object load() { return ME; } object load() { return ME; }
@ -99,6 +103,7 @@ varargs int real_logon(int failure) {
// emit("If-None-Match: " + etag + "\r\n"); // emit("If-None-Match: " + etag + "\r\n");
// we won't need connection: close w/ http/1.0 // we won't need connection: close w/ http/1.0
//emit("Connection: close\r\n\r\n"); //emit("Connection: close\r\n\r\n");
P1(("%O fetching /%s from %O\n", ME, resource, host))
P4(("%O using %O\n", ME, buffer)) P4(("%O using %O\n", ME, buffer))
emit("GET /"+ resource +" HTTP/1.0\r\n" emit("GET /"+ resource +" HTTP/1.0\r\n"
"Host: "+ host +"\r\n" "Host: "+ host +"\r\n"