[BUG] Hugely inefficient FTP code: coding opportunity

Cees de Groot cg at home.cdegroot.com
Wed Feb 13 08:32:57 UTC 2002


Hannes Hirzel <hirzel at spw.unizh.ch> said:
>> HTTPSocket>>httpPut: contents to: url user: user passwd: passwd
>> 
>
>It does not work for me. I do an inspect on
>
>HTTPSocket httpPut: '<html><h1>hello world</h1></html>' to:
>'http://myDomain/myDirectory/testh.html' user: 'myUserName'
>passwd: 'myPassWord'
>
>HTTP/1.0 301 Moved Permanently
Looks like an Apache-side configuration issue.

Enter netcat. 
------ 8< ---- snip ---
% nc -v -l -p 12345
listening on [any] 12345 ...

<back to squeak, doing the put>

connect to [127.0.0.1] from localhost [127.0.0.1] 34065
PUT /some/test/file.html HTTP/1.0
User-Agent: Squeak 2.0
Host: localhost:12345
ACCEPT: */*
Authorization: Basic dXNlcjpwYXNz
Content-length: 3

foo
------ 8< ---- snip ---
Looks like a perfectly acceptable HTTP put to me. 

-- 
Cees de Groot               http://www.cdegroot.com     <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B



More information about the Squeak-dev mailing list