cerr writes:
> Hi,
>
> I have a Python script that is executing an http POST to transfer a file from
> the client to the server. I have achieved this with below code:
> but my problem is, the data gets posted to the sever but arrives in
> the `$_REQUEST` array and I'm expected to post stuff s
On Tuesday, August 6, 2013 5:14:48 PM UTC-7, MRAB wrote:
> On 06/08/2013 23:52, cerr wrote:
>
> > Hi,
>
> >
>
> > Why does this code:
>
> >
>
> > #!/usr/bin/python
>
> >
>
> >
>
> > import urllib2
>
> > from binascii import hexlify, unhexlify
>
> >
>
> > host = "localhost"
>
> > uri="/t
On Tue, Aug 6, 2013 at 11:52 PM, cerr wrote:
> ./post.py
> Traceback (most recent call last):
> File "./post.py", line 13, in
> response = urllib2.urlopen(req, 120)
> File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
> return _opener.open(url, data, timeout)
> File "/usr/li
On 06/08/2013 23:52, cerr wrote:
Hi,
Why does this code:
#!/usr/bin/python
import urllib2
from binascii import hexlify, unhexlify
host = "localhost"
uri="/test.php"
data ="\x48\x65\x6C\x6C\x6F\x57\x6F\x72\x6C\x64" #Hello World
url="http://{0}{1}?f=test".format(host, uri)
req = urllib2.Reques
On Tue, Aug 6, 2013 at 7:35 PM, cerr wrote:
> On Tuesday, August 6, 2013 4:08:34 PM UTC-7, Joel Goldstick wrote:
>> On Tue, Aug 6, 2013 at 6:52 PM, cerr wrote:
>>
>> > Hi,
>>
>> >
>>
>> > Why does this code:
>>
>> >
>>
>> > #!/usr/bin/python
>>
>> >
>>
>> >
>>
>> > import urllib2
>>
>> > from bin
On Tuesday, August 6, 2013 4:08:34 PM UTC-7, Joel Goldstick wrote:
> On Tue, Aug 6, 2013 at 6:52 PM, cerr wrote:
>
> > Hi,
>
> >
>
> > Why does this code:
>
> >
>
> > #!/usr/bin/python
>
> >
>
> >
>
> > import urllib2
>
> > from binascii import hexlify, unhexlify
>
> >
>
> > host = "loc
On Tue, Aug 6, 2013 at 6:52 PM, cerr wrote:
> Hi,
>
> Why does this code:
>
> #!/usr/bin/python
>
>
> import urllib2
> from binascii import hexlify, unhexlify
>
> host = "localhost"
> uri="/test.php"
> data ="\x48\x65\x6C\x6C\x6F\x57\x6F\x72\x6C\x64" #Hello World
> url="http://{0}{1}?f=test".forma
Cookies work because I am able to login on website and GET other pages.
--
http://mail.python.org/mailman/listinfo/python-list
On May 28, 5:24 pm, christian schulze wrote:
> On 28 Mai, 17:20, yqyq22 wrote:
>
>
>
>
>
> > On May 28, 5:17 pm, christian schulze wrote:
>
> > > On 28 Mai, 16:47, yqyq22 wrote:
>
> > > > Hy, i would like to create a little script to reproduce this one
> > > > below:
> > > > Do you have suggest
On 28 Mai, 17:20, yqyq22 wrote:
> On May 28, 5:17 pm, christian schulze wrote:
>
>
>
> > On 28 Mai, 16:47, yqyq22 wrote:
>
> > > Hy, i would like to create a little script to reproduce this one
> > > below:
> > > Do you have suggestion?
>
> > > POST /folder/path/upload.exe?/dir HTTP/1.1
> > > Ho
On May 28, 5:17 pm, christian schulze wrote:
> On 28 Mai, 16:47, yqyq22 wrote:
>
>
>
>
>
> > Hy, i would like to create a little script to reproduce this one
> > below:
> > Do you have suggestion?
>
> > POST /folder/path/upload.exe?/dir HTTP/1.1
> > Host: 192.168.100.1:8080
> > User-Agent: Mozill
On 28 Mai, 16:47, yqyq22 wrote:
> Hy, i would like to create a little script to reproduce this one
> below:
> Do you have suggestion?
>
> POST /folder/path/upload.exe?/dir HTTP/1.1
> Host: 192.168.100.1:8080
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
> 1.9.2.3) Gecko/2010040
On May 12, 6:13 am, Kushal Kumaran
wrote:
> On Tue, May 11, 2010 at 3:59 PM, kak...@gmail.com wrote:
> > On May 11, 10:56 am, "kak...@gmail.com" wrote:
> >> On May 11, 5:06 am, Kushal Kumaran
> >> wrote:
>
> >> > On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com
> >> > wrote:
> >> > > On May
On Tue, May 11, 2010 at 3:59 PM, kak...@gmail.com wrote:
> On May 11, 10:56 am, "kak...@gmail.com" wrote:
>> On May 11, 5:06 am, Kushal Kumaran
>> wrote:
>>
>>
>>
>> > On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
>> > > On May 10, 10:22 am, Kushal Kumaran
>> > > wrote:
>> > >> On M
On May 11, 10:56 am, "kak...@gmail.com" wrote:
> On May 11, 5:06 am, Kushal Kumaran
> wrote:
>
>
>
> > On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
> > > On May 10, 10:22 am, Kushal Kumaran
> > > wrote:
> > >> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com
> > >> wrote:
> > >>
On May 11, 5:06 am, Kushal Kumaran
wrote:
> On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
> > On May 10, 10:22 am, Kushal Kumaran
> > wrote:
> >> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
> >> > Hi to all, i want to ask you a question, concerning the best way to do
> >
On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
> On May 10, 10:22 am, Kushal Kumaran
> wrote:
>> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
>> > Hi to all, i want to ask you a question, concerning the best way to do
>> > the following as a POST request:
>> > There is serv
On May 10, 10:22 am, Kushal Kumaran
wrote:
> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
> > Hi to all, i want to ask you a question, concerning the best way to do
> > the following as a POST request:
> > There is server-servlet that accepts xml commands
> > It had the following HTTP
On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
> Hi to all, i want to ask you a question, concerning the best way to do
> the following as a POST request:
> There is server-servlet that accepts xml commands
> It had the following HTTP request headers:
>
> Host: somehost.com
>
John Giotta wrote:
>
>Is there a verbose feature for urllib2.urlopen?
You have the full source code for the module right in front of you.
Bringing up urllib2.py in an editor is quicker than waiting for a newsgroup
reply.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
--
http://ma
Is there a verbose feature for urllib2.urlopen?
Here is my python snippet for posted the file:
req = urllib2.Request(url='https://%s%s' % (host, selector),
data=open('test.zip', 'rb').read())
req.add_header('content-type', 'application/zip')
req.add_header('Authorization', 'Basic %s' % self.auth)
On 2009-09-09, John D Giotta wrote:
> I'm working with an API that allows me to POST a zip file via HTTP and
> the documentation uses a cURL example. cURL works, but when I try to
> POST the file via python it fails.
> I don't want to use cURL (since I'm trying to be transparent and
> dependency-l
On Wed, Sep 9, 2009 at 1:57 PM, John D Giotta wrote:
> I'm working with an API that allows me to POST a zip file via HTTP and
> the documentation uses a cURL example. cURL works, but when I try to
> POST the file via python it fails.
> I don't want to use cURL (since I'm trying to be transparent an
Paul Rubin wrote:
> Wolfgang Draxinger <[EMAIL PROTECTED]> writes:
>> Am I just blind for some urllib2/httplib feature, or some
>> other library? Or do I really have to fiddle around with
>> sockets myself (I hope not...).
>
> I did something like that by just opening a socket and writing
> the
>
Wolfgang Draxinger <[EMAIL PROTECTED]> writes:
> Am I just blind for some urllib2/httplib feature, or some other
> library? Or do I really have to fiddle around with sockets
> myself (I hope not...).
I did something like that by just opening a socket and writing the
stuff with socket.sendall. It'
Wolfgang Draxinger wrote:
> The problem is, that videos, by nature are rather big files,
> however urllib2 wants it's Request objects being prepared
> beforehand, which would mean to first load the whole file to memory.
Try using mmap. Here is some untested code:
map = mmap(file.fileno(
En Sat, 19 Jan 2008 21:19:24 -0200, Wolfgang Draxinger
<[EMAIL PROTECTED]> escribi�:
> I'm thinking about writing a script to upload videos to sites
> like YouTube or Google Video, which is usually done by a HTTP
> POST.
>
> The problem is, that videos, by nature are rather big files,
> however
Benji - that worked like a champ - my mistake. thanks
Vinod
--
http://mail.python.org/mailman/listinfo/python-list
vm wrote:
> Hi, for some reason my POST is not working properly.
Look at the URL again, you missed a character. You had:
httpSess.request("POST","/",params,headers)
It should be:
httpSess.request("POST","/q",params,headers)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-lis
29 matches
Mail list logo