Author Topic: empty file stored in HFS  (Read 109293 times)

0 Members and 1 Guest are viewing this topic.

Offline dileep

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
empty file stored in HFS
« on: June 17, 2012, 09:30:23 PM »
Hello,

I am trying to upload a temp.txt with some data ex:dileep.

After sending POST as below, new file is created but its contents is 0 KB, please suggest me where i am going wrong

"POST /HFS/ HTTP/1.1\r\nHost: 192.168.0.101:8080\r\nConnection: keep-alive\r\nAuthorization: Basic ZGlsZWVwOnJpb3BvcnQ=\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nReferer: http://192.168.0.101:8080/HFS/~upload\r\nAccept-Encoding: gzip,deflate,sdch\r\nAccept-Language: en-US,en;q=0.8\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\r\nContent-Type: multipart/form-data; boundary=---------------------------265001916915724\r\nContent-Length: 205\r\n\r\n-----------------------------265001916915724\r\nContent-Type: text/plain\r\nContent-Disposition: form-data; name=\"fileupload1\"; filename=\"temp.txt\"\r\n\r\ndileep\r\n\r\n-----------------------------265001916915724--\r\n"

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12837
    • View Profile
Re: empty file stored in HFS
« Reply #1 on: June 18, 2012, 11:28:05 AM »
i wrote a little php script to test your POST, and it worked, creating an 8 bytes file.

i don't know what's happening on your side. Maybe you are out of space. What if you upload the file using the web interface?

Code: [Select]
fwrite(fsockopen('localhost',8080), "POST /HFS/ HTTP/1.1\r\nHost: 192.168.0.101:8080\r\nConnection: keep-alive\r\nAuthorization: Basic ZGlsZWVwOnJpb3BvcnQ=\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nReferer: http://192.168.0.101:8080/HFS/~upload\r\nAccept-Encoding: gzip,deflate,sdch\r\nAccept-Language: en-US,en;q=0.8\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\r\nContent-Type: multipart/form-data; boundary=---------------------------265001916915724\r\nContent-Length: 205\r\n\r\n-----------------------------265001916915724\r\nContent-Type: text/plain\r\nContent-Disposition: form-data; name=\"fileupload1\"; filename=\"temp.txt\"\r\n\r\ndileep\r\n\r\n-----------------------------265001916915724--\r\n");
« Last Edit: June 18, 2012, 11:37:03 AM by rejetto »

Offline dileep

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
Re: empty file stored in HFS
« Reply #2 on: June 18, 2012, 09:07:20 PM »
thanks for your input,

when i use web interface it worked fine.

can you share me the protocol between server & client.

Complete log in HFS: Still i am facing problem, only an empty file is stored

19-06-2012 08:23:32 Server start
19-06-2012 08:24:35 192.168.0.105:4097 Connected
19-06-2012 08:24:35 192.168.0.105:4097 Got 470 bytes
19-06-2012 08:24:35 dileep@192.168.0.105:4097 Requested GET /HFS/~login
19-06-2012 08:24:35 dileep@192.168.0.105:4097 Request dump
> GET /HFS/~login HTTP/1.1
> Host: 192.168.0.101:8080
> Connection: keep-alive
> Authorization: Basic ZGlsZWVwOnJpb3BvcnQ=
> User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Referer: http://192.168.0.101:8080/
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: en-US,en;q=0.8
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
19-06-2012 08:24:35 dileep@192.168.0.105:4097 Sent 106 bytes
19-06-2012 08:24:35 dileep@192.168.0.105:4097 Redirected to /HFS/
19-06-2012 08:24:35 dileep@192.168.0.105:4097 Disconnected by server - 106 bytes sent
19-06-2012 08:24:35 192.168.0.105:4098 Connected
19-06-2012 08:24:35 192.168.0.105:4098 Got 475 bytes
19-06-2012 08:24:35 dileep@192.168.0.105:4098 Requested GET /HFS/
19-06-2012 08:24:35 dileep@192.168.0.105:4098 Request dump
> GET /HFS/ HTTP/1.1
> Host: 192.168.0.101:8080
> Connection: keep-alive
> Authorization: Basic ZGlsZWVwOnJpb3BvcnQ=
> User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Referer: http://192.168.0.101:8080/
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: en-US,en;q=0.8
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
19-06-2012 08:24:35 dileep@192.168.0.105:4098 Sent 1053 bytes
19-06-2012 08:24:35 dileep@192.168.0.105:4098 Served 1.03 KB
19-06-2012 08:24:36 192.168.0.105:4099 Connected
19-06-2012 08:24:36 192.168.0.105:4099 Got 488 bytes
19-06-2012 08:24:36 dileep@192.168.0.105:4099 Requested GET /HFS/~upload
19-06-2012 08:24:36 dileep@192.168.0.105:4099 Request dump
> GET /HFS/~upload HTTP/1.1
> Host: 192.168.0.101:8080
> Connection: keep-alive
> Authorization: Basic ZGlsZWVwOnJpb3BvcnQ=
> User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Referer: http://192.168.0.101:8080/HFS/
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: en-US,en;q=0.8
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
19-06-2012 08:24:36 dileep@192.168.0.105:4099 Sent 1331 bytes
19-06-2012 08:24:36 dileep@192.168.0.105:4099 Served 1.30 KB
19-06-2012 08:24:36 192.168.0.105:4100 Connected
19-06-2012 08:24:36 192.168.0.105:4100 Got 781 bytes
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Uploading temp.txt
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Fully uploaded -  58 B @ 3 KB/s
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Requested POST /HFS/
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Request dump
> POST /HFS/ HTTP/1.1
> Host: 192.168.0.101:8080
> Connection: keep-alive
> Authorization: Basic ZGlsZWVwOnJpb3BvcnQ=
> User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Referer: http://192.168.0.101:8080/HFS/~upload
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: en-US,en;q=0.8
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
> Content-Type: multipart/form-data; boundary=---------------------------265001916915724
> Content-Length: 205
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Sent 993 bytes
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Served 993 B
19-06-2012 08:24:36 dileep@192.168.0.105:4100 Disconnected - 993 bytes sent
19-06-2012 08:24:36 dileep@192.168.0.105:4099 Disconnected - 1331 bytes sent
19-06-2012 08:24:36 dileep@192.168.0.105:4098 Disconnected - 1053 bytes sent


Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12837
    • View Profile
Re: empty file stored in HFS
« Reply #3 on: June 23, 2012, 06:43:49 AM »
sorry for the late reply.
i don't understand what you want me to do.

Offline dileep

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
Re: empty file stored in HFS
« Reply #4 on: June 24, 2012, 09:02:46 PM »
it worked, thanks