diff src/c/urweb.c @ 1386:64724ef86149

Basis.currentUrlHasPost
author Adam Chlipala <adam@chlipala.net>
date Thu, 06 Jan 2011 14:45:52 -0500
parents 86d23010ea74
children 3913cbfd72e9
line wrap: on
line diff
--- a/src/c/urweb.c	Thu Jan 06 14:25:42 2011 -0500
+++ b/src/c/urweb.c	Thu Jan 06 14:45:52 2011 -0500
@@ -442,7 +442,7 @@
   void *logger_data;
   uw_logger log_debug;
 
-  int hasPostBody;
+  int isPost, hasPostBody;
   uw_Basis_postBody postBody;
   uw_Basis_string queryString;
 
@@ -508,7 +508,7 @@
   ctx->logger_data = logger_data;
   ctx->log_debug = log_debug;
 
-  ctx->hasPostBody = 0;
+  ctx->isPost = ctx->hasPostBody = 0;
 
   ctx->queryString = NULL;
 
@@ -588,7 +588,7 @@
   ctx->cur_container = NULL;
   ctx->used_transactionals = 0;
   ctx->script_header = "";
-  ctx->hasPostBody = 0;
+  ctx->isPost = ctx->hasPostBody = 0;
   ctx->queryString = NULL;
 }
 
@@ -3603,6 +3603,14 @@
   return ctx->hasPostBody;
 }
 
+void uw_isPost(uw_context ctx) {
+  ctx->isPost = 1;
+}
+
+uw_Basis_bool uw_Basis_currentUrlHasPost(uw_context ctx) {
+  return ctx->isPost;
+}
+
 void uw_setQueryString(uw_context ctx, uw_Basis_string s) {
   ctx->queryString = s;
 }