summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-03-18 13:25:21 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-03-18 13:25:21 +0000
commitfc38914b020c0d26436e83e85ebe2c4f1ba0ce06 (patch)
tree08470e4e08621344824bc6ee934074f890b62d8c
parent683ce495245e9ec5cfa2f9e708839c5c06bd4c8a (diff)
downloadxine-lib-fc38914b020c0d26436e83e85ebe2c4f1ba0ce06.tar.gz
xine-lib-fc38914b020c0d26436e83e85ebe2c4f1ba0ce06.tar.bz2
send host name
CVS patchset: 1586 CVS date: 2002/03/18 13:25:21
-rw-r--r--src/input/asxparser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input/asxparser.c b/src/input/asxparser.c
index e2d3195bd..c0142de4c 100644
--- a/src/input/asxparser.c
+++ b/src/input/asxparser.c
@@ -12,7 +12,7 @@ void asx_find_entries(char* buff, char** fname,
char *strupr(char *string);
-void first_request(char* buff, char* file,int *len) {
+void first_request(char *buff, char *host, char *file, int *len) {
char *ptr;
@@ -21,7 +21,7 @@ void first_request(char* buff, char* file,int *len) {
ptr+=sprintf(ptr,"GET %s HTTP/1.0\r\n",file);
ptr+=sprintf(ptr,"Accept: */*\r\n");
ptr+=sprintf(ptr,"User-Agent: xine/0.9.8\r\n");
- ptr+=sprintf(ptr,"Host: %s\r\n", "192.168.0.129");
+ ptr+=sprintf(ptr,"Host: %s\r\n", host);
ptr+=sprintf(ptr,"Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=0:0,request-context=1,max-duration=0\r\n");
ptr+=sprintf(ptr,"Pragma: xClientGUID=%s\r\n", "{33715801-BAB3-9D85-24E9-03B90328270A}");
ptr+=sprintf(ptr,"Connection: Close\r\n\r\n");
@@ -83,14 +83,14 @@ int asx_parse (char* mrl, char** rname) {
printf("asxparser: connect passed \n");
l=sizeof(buff);
- first_request(buff, hostend, &l);
+ first_request(buff, host, hostend, &l);
write(s,buff,l);
res=read(s,buff, sizeof(buff));
printf("asxparser: answer1=%s %d byte received \n",buff,res);
if(!strstr(buff,"mms://")) {
l=sizeof(buff);
- first_request(buff, hostend, &l);
+ first_request(buff, host, hostend, &l);
write(s,buff,l);
res=read(s,buff, sizeof(buff));
printf("asxparser: answer2=%s %d byte received\n",buff,res);