network connection to a http serevr - Unix

This is a discussion on network connection to a http serevr - Unix ; hello everyone, i have a problem regarding networking apis of unix link systems ....i don know this is the best place this request but i cudnt get one .(so also suggest where to ask such questions) the problem is that ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: network connection to a http serevr

  1. network connection to a http serevr

    hello everyone,

    i have a problem regarding networking apis of unix link systems ....i
    don know this is the best place this
    request but i cudnt get one .(so also suggest where to ask such
    questions)

    the problem is that after finally connecting to the server when
    i just tried to GET the image -i show u inputs that are taken by my
    program

    enter the server ip address : 10.10.19.222

    enter the port at which to connect to the server : 9029

    sucessfully connected to the server

    enter the url to request(without spaces) :http://10.10.19.222:9029/
    home/Mohan/mine/web/images/tech.jpg

    reading frm the server......

    now after this the output from the server is saved in a file which has
    contents like

    HTTP/1.1 200 OK^M
    Date: Sun, 09 Nov 2008 06:36:32 GMT^M
    Server: Apache/2.2.6 (Fedora)^M
    Last-Modified: Fri, 07 Nov 2008 12:27:31 GMT^M
    ETag: "1780314-1533e9-897f32c0"^M
    Accept-Ranges: bytes^M
    Content-Length: 1389545^M
    Connection: close^M
    Content-Type: image/jpeg^M
    X-Pad: avoid browser bug^M
    ^M
    <90>
    ExifRL failed: 6
    2009-09-26 22:31:06, Fetching URL failed: 6
    h1>Moved Permanently

    The document has moved here.




    Apache/2.2.6 (Fedora) Server at 10.10.19.222 Port 9029 address>

    ~

    but when i try to view this from the browser with exactly the same url
    i have the image .....what can be wrong....



    where is the problem in the system (server ,code ,write() ,etc)
    the server is apache running on my local machine .
    i use fedora8(linux)

    thanks a lot
    Mohan

  2. Re: network connection to a http serevr

    mohi writes:

    > i have a problem regarding networking apis of unix link systems ....i
    > don know this is the best place this
    > request but i cudnt get one .(so also suggest where to ask such
    > questions)
    >
    > the problem is that after finally connecting to the server when
    > i just tried to GET the image -i show u inputs that are taken by my
    > program
    >
    > enter the server ip address : 10.10.19.222
    >
    > enter the port at which to connect to the server : 9029
    >
    > sucessfully connected to the server
    >
    > enter the url to request(without spaces) :http://10.10.19.222:9029/
    > home/Mohan/mine/web/images/tech.jpg
    >
    > reading frm the server......
    >
    > now after this the output from the server is saved in a file which has
    > contents like
    >
    > HTTP/1.1 200 OK^M
    > Date: Sun, 09 Nov 2008 06:36:32 GMT^M
    > Server: Apache/2.2.6 (Fedora)^M
    > Last-Modified: Fri, 07 Nov 2008 12:27:31 GMT^M
    > ETag: "1780314-1533e9-897f32c0"^M
    > Accept-Ranges: bytes^M
    > Content-Length: 1389545^M
    > Connection: close^M
    > Content-Type: image/jpeg^M
    > X-Pad: avoid browser bug^M
    > ^M
    > ÿØÿá<90>
    > ExifRL failed: 6


    This (at least most of it) could well be the start of an image/jpeg

    > 2009-09-26 22:31:06, Fetching URL failed: 6
    > h1>Moved Permanently
    >

    The document has moved here.


    >

    >
    Apache/2.2.6 (Fedora) Server at 10.10.19.222 Port 9029 > address>
    >


    But this looks like another response altogether.

    I suspect that seeing the code will help.

    --
    Ben.

  3. Re: network connection to a http serevr

    > 2009-09-26 22:31:06, Fetching URL failed: 6
    > h1>Moved Permanently
    >

    The document has moved here.



    Server tells you that document has been moved to another location
    (10.10.19.222:9029/home/Mohan). You can see pic in the browser because
    browser automatically navigates to the new address. But looks like
    your code doesn't

+ Reply to Thread