File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 3
3
from pypulse import View
4
4
from pypulse .Template import Template
5
5
from pypulse .Utils import execute_ast_view_request
6
-
6
+ import urllib . parse
7
7
8
8
class RequestHandler (http .server .SimpleHTTPRequestHandler ):
9
9
def __init__ (self , * args , ** kwargs ):
@@ -40,12 +40,11 @@ def do_GET(self):
40
40
41
41
def do_POST (self ):
42
42
content_length = int (self .headers ['Content-Length' ])
43
- post_body = self .rfile .read (content_length )
43
+ post_body = urllib . parse . parse_qs ( self .rfile .read (content_length ). decode ( 'utf-8' ) )
44
44
temp_post_body = {}
45
- for i in post_body .decode ('utf-8' ).split ('&' ):
46
- element = i .split ('=' )
47
- if len (element ) == 2 :
48
- temp_post_body [element [0 ]] = element [1 ]
45
+
46
+ for i in post_body :
47
+ temp_post_body [i ] = post_body [i ][0 ]
49
48
50
49
current_view = View .CallView (self .path )
51
50
Original file line number Diff line number Diff line change 9
9
setup (
10
10
name = 'python-pulse' ,
11
11
packages = find_packages (),
12
- version = '0.1.5 ' ,
12
+ version = '0.1.6 ' ,
13
13
description = 'Python, create desktop applications based on Chromium' ,
14
14
long_description = long_description ,
15
15
long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments