Apache PUT and Delphi client

Apache PUT and Delphi client

Post by Evelio Martíne » Tue, 29 Jan 2002 17:56:39



Hi!

I have done a client (using Delphi NetMaster component version 5.3.0 build
1055) that upload files to the web server (Apache) via FTP and HTTP.

I have problems when I use HTTP with the PUT method. I have use as a base
the perl script in http://www.apacheweek.com/issues/put1

If the files do not exist in the server the files get uploaded correctly but
if the files are already there I have all kind of problems.

How can I delete the files on the server to avoid the problem?
How can I get the filename parameter to delete it before upload?
DELETE script handler method? if so, does anyone have an example?

Any suggestions ?

Thanks in advance

------------
Evelio Martnez

 
 
 

Apache PUT and Delphi client

Post by adam » Tue, 29 Jan 2002 21:51:42



> I have done a client (using Delphi NetMaster component version 5.3.0 build
> 1055) that upload files to the web server (Apache) via FTP and HTTP.

> I have problems when I use HTTP with the PUT method. I have use as a base
> the perl script in http://www.apacheweek.com/issues/put1

> If the files do not exist in the server the files get uploaded correctly but
> if the files are already there I have all kind of problems.

> How can I delete the files on the server to avoid the problem?
> How can I get the filename parameter to delete it before upload?
> DELETE script handler method? if so, does anyone have an example?

You might be better off using the mod_dav module:
http://www.webdav.org/mod_dav/

--
-adam                 | "Be liberal in what you accept, and
Systems Administrator |  conservative in what you send"
Indiana University    |      -Jon Postel
Bloomington, Indiana  |

 
 
 

Apache PUT and Delphi client

Post by Evelio Martíne » Fri, 01 Feb 2002 05:29:38




> > I have done a client (using Delphi NetMaster component version 5.3.0 build
> > 1055) that upload files to the web server (Apache) via FTP and HTTP.

> > I have problems when I use HTTP with the PUT method. I have use as a base
> > the perl script in http://www.apacheweek.com/issues/put1

> > If the files do not exist in the server the files get uploaded correctly but
> > if the files are already there I have all kind of problems.

> > How can I delete the files on the server to avoid the problem?
> > How can I get the filename parameter to delete it before upload?
> > DELETE script handler method? if so, does anyone have an example?

> You might be better off using the mod_dav module:
> http://www.webdav.org/mod_dav/

> --
> -adam                 | "Be liberal in what you accept, and
> Systems Administrator |  conservative in what you send"
> Indiana University    |      -Jon Postel
> Bloomington, Indiana  |

ok that could be an option but I would like to know why the above script works ok
if I delete the file "by hand" previous to the upload or I include a line in the
script
for example:
...
`rm /home/httpd/dir1/subdir2/file`
...

but not if I change the above line with
...
$path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
$filetodelete = "/home/httpd" .   "$path_info";
`rm $filetodelete`;
...
Is PATH_INFO supposed to contain the PUT header sent by the client??

PUT /dir1/subdir2/file HTTP/1.0
...

Thanks in advance

Evelio Martnez

 
 
 

1. wu-ftpd 2.6.1 (latest) breaks Delphi ftp client?

Hi,

My customer has a Windows program developed with Borland Delphi which
implements a ftp client. I understand the original delphi ftp library
and function calls were used in the development of this program.

The program is used to access files in a linux server (RH 6.2).

The program was working fine with wu-ftpd 2.5 but has problems with
wu-ftpd 2.6.1 which was installed last Friday after the bug warnings
in the usual security sites.

This is what happens:

- the client is running on a Win NT machine
- the control connection works fine (port 21)
- but the ftp-data connection does not work: the client program
requests a directory listing but after three attempts it times-out.
(it used to work perfectly with wu-ftpd 2.5)

I monitored the connection with tcpdump and noticed the following
packets during the ftp-data connection:

21:07:02.228835 > gateway.CUSTOMER.com.ftp-data >
ws1.CUSTOMER.com.1150: S 736749240:736749240(0) win 32120 <mss
1460,sackOK,timestamp 426140257 0,nop,wscale 0> (DF)

21:07:02.229432 < ws1.CUSTOMER.com.1150 >
gateway.CUSTOMER.com.ftp-data: S 59599:59599(0) ack 736749241 win 8760
<mss 1460> (DF)

I didn't notice those flags during normal connections; they only show
with the delphi application. I'm not proficient with packet headers,
so I don't know what those flags are telling me.

Please note that a browser (Netscape or IE) or MS-DOS ftp client from
the _same_ Windows machine will work perfectly, get directory
listings, download files, etc.

To be sure, I reinstalled wu-ftpd 2.5 and everything was back to
normal; again upgrading to wu-ftpd 2.6.1 broke the program. And,
additionally, I tried two wu-ftpd 2.6.0.x versions and they did NOT
work either.

Any help/comments/suggestions will be appreciated.

2. Can't load module ppp lp slip and ps/aux error?

3. Matrox Mystique ands X.

4. Problem configuring INN

5. FTP client freezes after PUT starts

6. SB EnsoniqPCI + old 8bit SB in OSS/free?

7. missing put in AFS client

8. Difference between Xterm and rxvt

9. ftp client hangs up while attempting to put directorystructures

10. Looking for a client for PUT

11. Put document from client to server???

12. ANNOUNCE: http-tiny-1.0 C lib & client, with PUT, DELETE,...

13. REPOST patch 18/38: CLIENT: put nfs_async_handle_jukebox() in fs/nfs/nfs3proc.c