Klaus Demo bjoern / 8024f40
Style Make function definition style more consistent in request.c. Patrick Lucas 8 years ago
1 changed file(s) with 8 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
107107 Py_DECREF(val); \
108108 } while(0)
109109
110 static int on_message_begin(http_parser* parser)
110 static int
111 on_message_begin(http_parser* parser)
111112 {
112113 REQUEST->headers = PyDict_New();
113114 PARSER->field = (string){NULL, 0};
115116 return 0;
116117 }
117118
118 static int on_path(http_parser* parser, char* path, size_t len)
119 static int
120 on_path(http_parser* parser, char* path, size_t len)
119121 {
120122 if(!(len = unquote_url_inplace(path, len)))
121123 return 1;
123125 return 0;
124126 }
125127
126 static int on_query_string(http_parser* parser, const char* query, size_t len)
128 static int
129 on_query_string(http_parser* parser, const char* query, size_t len)
127130 {
128131 _set_header_free_value(_QUERY_STRING, PyString_FromStringAndSize(query, len));
129132 return 0;
130133 }
131134
132 static int on_header_field(http_parser* parser, const char* field, size_t len)
135 static int
136 on_header_field(http_parser* parser, const char* field, size_t len)
133137 {
134138 if(PARSER->value.data) {
135139 /* Store previous header and start a new one */