Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 9th, 2004, 01:47 PM
bootrecker bootrecker is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 8 bootrecker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
urllib2 and Keep-Alive

I'm trying to automate a form submission. But it seems that after a few tries by the script to get on the page (3 actually), I get error 302 infinite redirect on every following attempt. After sniffing the traffic, the only difference that I can detect is that Python is issuing a Connection: close header instead of using keep-alive. I think maybe the server is denying access since multiple connections are being opened.

I haven't been able to figure out how to get keep-alive working. Some things I have read say that it is supported, but I'm not sure. Just setting the header doesn't seem to work (it gets over-ridden by a Connection: close). And if it is supported, is it supported in conjuction with cookielib? I'm using Python 2.4 so cookielib has ClientCookie builtin. Any thoughts would be greatly appreciated!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > urllib2 and Keep-Alive


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT