rejetto forum
		Software => HFS ~ HTTP File Server => Topic started by: dileep on June 18, 2012, 03:30:23 AM
		
			
			- 
				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"
- 
				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?
 
 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");
 
- 
				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
 
 
- 
				sorry for the late reply.
 i don't understand what you want me to do.
- 
				it worked, thanks