def _load_post_and_files(This): "Populates This._post and This._files" Ctype = Env.HTTP_CONTENT_TYPE or '' if Ctype.startswith('multipart'): This._post, This._files = http.parse_file_upload(This._headers_in, This.raw_post_data) else: This._post, This._files = http.QueryDict(This.raw_post_data), datastructures.MultiValueDict()
def _load_post_and_files(This): "Populates This._post and This._files" Ctype = Env.HTTP_CONTENT_TYPE or '' if Ctype.startswith('multipart'): This._post, This._files = http.parse_file_upload( This._headers_in, This.raw_post_data) else: This._post, This._files = http.QueryDict( This.raw_post_data), datastructures.MultiValueDict()
def _load_post_and_files(self): "Populates self._post and self._files" if 'content-type' in self._req.headers_in and self._req.headers_in[ 'content-type'].startswith('multipart'): self._post, self._files = http.parse_file_upload( self._req.headers_in, self.raw_post_data) else: self._post, self._files = http.QueryDict( self.raw_post_data), datastructures.MultiValueDict()
def _load_post_and_files(self): # Populates self._post and self._files if self.method == 'POST': if self.environ.get('CONTENT_TYPE', '').startswith('multipart'): header_dict = dict([(k, v) for k, v in self.environ.items() if k.startswith('HTTP_')]) header_dict['Content-Type'] = self.environ.get('CONTENT_TYPE', '') self._post, self._files = http.parse_file_upload(header_dict, self.raw_post_data) else: self._post, self._files = http.QueryDict(self.raw_post_data), datastructures.MultiValueDict() else: self._post, self._files = http.QueryDict(''), datastructures.MultiValueDict()
def _load_post_and_files(self): # Populates self._post and self._files if self.method == "POST": if self.environ.get("CONTENT_TYPE", "").startswith("multipart"): header_dict = dict([(k, v) for k, v in self.environ.items() if k.startswith("HTTP_")]) header_dict["Content-Type"] = self.environ.get("CONTENT_TYPE", "") self._post, self._files = http.parse_file_upload(header_dict, self.raw_post_data) else: self._post, self._files = http.QueryDict(self.raw_post_data), datastructures.MultiValueDict() else: self._post, self._files = http.QueryDict(""), datastructures.MultiValueDict()
def _load_post_and_files(self): # Populates self._post and self._files if self.method == 'POST': if self.environ.get('CONTENT_TYPE', '').startswith('multipart'): header_dict = dict([(k, v) for k, v in self.environ.items() if k.startswith('HTTP_')]) header_dict['Content-Type'] = self.environ.get( 'CONTENT_TYPE', '') self._post, self._files = http.parse_file_upload( header_dict, self.raw_post_data) else: self._post, self._files = http.QueryDict( self.raw_post_data), datastructures.MultiValueDict() else: self._post, self._files = http.QueryDict( ''), datastructures.MultiValueDict()
def _load_post_and_files(self): "Populates self._post and self._files" if 'content-type' in self._req.headers_in and self._req.headers_in['content-type'].startswith('multipart'): self._post, self._files = http.parse_file_upload(self._req.headers_in, self.raw_post_data) else: self._post, self._files = http.QueryDict(self.raw_post_data, encoding=self._encoding), datastructures.MultiValueDict()