Skip to content
This repository
Browse code

Removes reply_100_continue()

  • Loading branch information...
commit 354270198d40046e2d2a11ed9b181c4489a330af 1 parent 6a7a163
Alvaro Lopez Ortega authored February 14, 2012

Showing 1 changed file with 9 additions and 30 deletions. Show diff stats Hide diff stats

  1. 39  cherokee/post.c
39  cherokee/post.c
@@ -28,8 +28,7 @@
28 28
 #include "request-protected.h"
29 29
 #include "util.h"
30 30
 
31  
-#define ENTRIES           "post"
32  
-// #define HTTP_100_RESPONSE "HTTP/1.1 100 Continue" CRLF CRLF
  31
+#define ENTRIES "post"
33 32
 
34 33
 
35 34
 /* Base functions
@@ -166,31 +165,6 @@ parse_header (cherokee_post_t    *post,
166 165
 
167 166
 
168 167
 static ret_t
169  
-reply_100_continue (cherokee_post_t    *post,
170  
-		    cherokee_request_t *req)
171  
-{
172  
-	ret_t  ret;
173  
-	size_t written;
174  
-
175  
-	ret = cherokee_socket_bufwrite (&req->socket, &post->read_header_100cont, &written);
176  
-	if (ret != ret_ok) {
177  
-		TRACE(ENTRIES, "Could not send a '100 Continue' response. Error=500.\n");
178  
-		return ret;
179  
-	}
180  
-
181  
-	if (written >= post->read_header_100cont.len) {
182  
-		TRACE(ENTRIES, "Sent a '100 Continue' response.\n");
183  
-		return ret_ok;
184  
-	}
185  
-
186  
-	TRACE(ENTRIES, "Sent partial '100 Continue' response: %d bytes\n", written);
187  
-	cherokee_buffer_move_to_begin (&post->read_header_100cont, written);
188  
-
189  
-	return ret_ok;
190  
-}
191  
-
192  
-
193  
-static ret_t
194 168
 remove_surplus (cherokee_post_t    *post,
195 169
 		cherokee_request_t *req)
196 170
 {
@@ -271,13 +245,18 @@ cherokee_post_read_header (cherokee_post_t *post)
271 245
 			return ret_ok;
272 246
 		}
273 247
 
274  
-//		cherokee_buffer_add_str (&post->read_header_100cont, HTTP_100_RESPONSE);
  248
+		post->read_header_phase = cherokee_post_read_header_100cont;
  249
+
  250
+		/* Build the response
  251
+		 */
275 252
 		cherokee_protocol_add_response (&conn->protocol, http_version_11, http_continue, NULL);
276 253
 
277  
-		post->read_header_phase = cherokee_post_read_header_100cont;
  254
+		/* fall down*/
278 255
 
279 256
 	case cherokee_post_read_header_100cont:
280  
-		return reply_100_continue (post, req);
  257
+		// TODO: Is this necessary??
  258
+		// Should the buffer forced to be sent?
  259
+		;
281 260
 	}
282 261
 
283 262
 	SHOULDNT_HAPPEN;

0 notes on commit 3542701

Please sign in to comment.
Something went wrong with that request. Please try again.