lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi, Lua-List

I try to connect to the internet with lua-sockets, but I can not authenticate against our http-proxy. I use this script to show up the problem (well I replaced the real user/pass/proxy values :-) :

#!/bin/lua
local http = require("socket.http")
PROXY="http://username:password@proxyhost:8080/";
local a,b,c,d=http.request{url="http://www.google.com/"}
print("A=",a)
print("B=",b)
print("C=",c)
print("D=",d)

Results:

A=      1
B=      403
C=      table: 004280D8
D=      HTTP/1.1 403 Forbidden ( The ISA Server denies the specified Uniform Resource Locator (URL).  )

As far as i can see, this was never implemented in socket.http. Does someone have a hint to make this work?

Regards