• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Authenticating to a site throught sockets (no https)

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to connect to a web site made with JSP's as to retrieve some news, however I need to login first (no https, it's a simple post to a jsp). I coded a proxy so I can monitor what is exchanged exactly between my browser and the server as to incorporate this information in the sockets to connect from my application.
Here's what my browser sends:
-- Input Begin --
POST http://www.meditel.ma/clb/firstIdent.jsp HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Referer: http://www.meditel.ma/clb/index.jsp?auth=2
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Host: www.meditel.ma
Content-Length: 43
Pragma: no-cache
Cookie: JSESSIONID=www.meditel.ma-18066%253A40660032%253Aef736cc39e2678b

-- Input End --
And this is what I ger as reply:
-- Reply Begin --
HTTP/1.1 302 Moved Temporarily
Server: "Meditel Server Web"
Date: Sat, 27 Mar 2004 22:30:26 GMT
Content-length: 2
Content-type: text/html;charset=ISO-8859-1
Set-cookie: JSESSIONID=www.meditel.ma-18084%253A4066005e%253A30c9a3b4932837de;path=/
Location: /err.jsp?t=1java.lang.NullPointerException
Connection: close

-- Reply End --
I tried this with another site that uses ASP's and Im not getting anything as reply also.
Did I miss anything?
I'll really apreciate your help. Thanks in advance.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic