Welcome! Log In Create A New Profile

Advanced

Re: [Nginx] perl module get an empty body

August 10, 2012 07:03AM
It can be reproduced by commenting/uncommenting the append in the following code:


#!/usr/bin/python
# -*- coding: utf-8 -*-

import urllib
import urllib2

url = 'https://www.test.com/test.php'
params = { 'name': 'Luke', 'location': 'Tatooine' }
pList = []
for paramKey, paramValue in params.items():
pList.append(urllib.quote_plus(unicode('%s=%s' % (paramKey, paramValue))))
#pList.append('%s=%s' % (paramKey, urllib.quote_plus(unicode(paramValue))))

post_params = '&'.join(pList)
req = urllib2.Request(url, data=post_params)
f = urllib2.urlopen(req)

print f.read()
Subject Author Posted

[Nginx] perl module get an empty body

darkweaver871 August 10, 2012 06:03AM

Re: [Nginx] perl module get an empty body

darkweaver871 August 10, 2012 06:04AM

Re: [Nginx] perl module get an empty body

darkweaver871 August 10, 2012 07:03AM

Re: [Nginx] perl module get an empty body

darkweaver871 August 10, 2012 09:44AM

Re: [Nginx] perl module get an empty body

Maxim Dounin August 10, 2012 07:14AM

Re: [Nginx] perl module get an empty body

darkweaver871 August 10, 2012 09:46AM

Re: [Nginx] perl module get an empty body

darkweaver871 August 10, 2012 10:12AM

Re: [Nginx] perl module get an empty body

Maxim Dounin August 10, 2012 09:56AM

Re: [Nginx] perl module get an empty body

Maxim Dounin August 10, 2012 01:12PM

Re: [Nginx] perl module get an empty body

darkweaver871 August 12, 2012 06:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready