mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-12 21:41:04 +00:00
behave!
This commit is contained in:
parent
7672aaa476
commit
426d2f7c8f
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user