Actually i figured out the content length problem and modified the source a bit. http://bpaste.net/raw/lax7e7qMLY3bKM69su9k/ but still there is 404 not found problem My requirement is this. "With httplib, i need to upload a file (png) with python at :http://xboz.5gbfree.com/screenshot/upload.php Regards, Ajin Abraham
Information Security Enthusiast. www.ajinabraham.com | www.defconkerala.org www.keralacyberforce.in | +91-9633325997 On Mon, May 6, 2013 at 10:35 PM, Ajin Abraham <aji...@gmail.com> wrote: > Hi, > I was working on a python project that requires to upload an image > using httplib. Here i need to POST a MULTI PART DATA with Python using > inbuilt libraries. I know there are better libraries like requests and > poster. but i need to do it with httplib itself. > > I will attach a screenshot==> http://s1.postimg.org/qjjhy445q/file.jpg > > So here i think there is some problem with my code that the > 'Content-Length is different and i am getting a 404 not found > response. i placed the file "screenshot.png" together with my python > source file. > > Here is my source code==>http://bpaste.net/show/V2xbtcBSpYsNbwGPCmFM/ > > Please tell me what's wrong in my code. and please don't suggest me > other libraries. > > Regards, > Ajin Abraham _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor