62 |
* 'GET /custom/page HTTP/1.1' ... if request statement is defined |
* 'GET /custom/page HTTP/1.1' ... if request statement is defined |
63 |
* and check the server's status code. |
* and check the server's status code. |
64 |
* |
* |
65 |
* If the host statement defines hostname, it is used in 'Host:' |
* If the statement defines hostname, it's used in the 'Host:' header |
66 |
* header. |
* otherwise a default (empty) Host header is set. |
67 |
* |
* |
68 |
* If the status code is >= 400, an error has occurred. |
* If the status code is >= 400, an error has occurred. |
69 |
* Return TRUE if the status code is OK, otherwise FALSE. |
* Return TRUE if the status code is OK, otherwise FALSE. |
133 |
"Accept: */*\r\n" |
"Accept: */*\r\n" |
134 |
"User-Agent: %s/%s\r\n" |
"User-Agent: %s/%s\r\n" |
135 |
"%s\r\n", |
"%s\r\n", |
136 |
request, Util_getHTTPHostHeader(s, host,STRLEN), |
request, Util_getHTTPHostHeader(s, host, STRLEN), |
137 |
prog, VERSION, get_auth_header(P, auth, STRLEN)) < 0) { |
prog, VERSION, get_auth_header(P, auth, STRLEN)) < 0) { |
138 |
log("HTTP: error sending data -- %s\n", STRERROR); |
log("HTTP: error sending data -- %s\n", STRERROR); |
139 |
return FALSE; |
return FALSE; |