Commits

Kirill Simonov committed eb394a3

Do not pass any HTTP methods but GET.

  • Participants
  • Parent commits 180888e

Comments (0)

Files changed (1)

File src/htsql/wsgi.py

         """
         Implements the WSGI entry point.
         """
+        # Pass GET requests only.
+        method = environ['REQUEST_METHOD']
+        if method != 'GET':
+            start_response('400 Bad Request', [('Content-Type', 'text/plain')])
+            return ["%s requests are not permitted.\n" % method]
         # Process the query.
         request = Request.build(environ)
         try: