Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9006109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:19:32+00:00 2026-06-16T01:19:32+00:00

Is it in fact possible to use Flask from a CGI? If so, how?

  • 0

Is it in fact possible to use Flask from a CGI?

If so, how? I am aware of the concise and nice looking documentation for CGI+Flask but it looks to me, like the request.args.get('varname') function is not working, when run as CGI. It certainly works for me on the same (Apache, Ubuntu 12.10) server when run as WSGI.

I came to the conclusion (or strong suspicion, rather) that args.get() is not working, after I ran the CGI script on the command line. It would just not pick up anything in QUERY_INFO.

Am I missing something vital about CGI in general, is it a bug in Flask, or what is going on here?

EDIT

The documentation for Flask is updated in git, but at the time of this writing not yet on the homepage. Just don’t use any print in your Flask application and CGI should work fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:19:33+00:00Added an answer on June 16, 2026 at 1:19 am

    The args thing is a red herring.

    The problem was in CGI, any print can mess up the output, and in this case it messed up the headers. Solution: don’t print any debug info or anything, when run as a CGI.

    Also;

    “… Google’s App Engine, where execution happens in a CGI-like environment”

    Apparently Google App Engine is similar to a CGI environment and the same print thing can be an issue there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to use the 'drupal commerce' distribution for selling images from a
Not sure if it's possible but I've been trying to use curl to essentially
Is it possible to make a windows service from a console application. In fact,
I have recently started looking into Google Charts API for possible use within the
I have a query that looks like this: SELECT * FROM A INNER JOIN
Is it possible to use separate ssdl, csdl and msl files for each Entity
It's possible to use Microsoft's OracleClient assembly to connect to an Oracle database, and
Is it possible to use Lucene Benchmark to index a wikipedia dump? I want
Wherever possible I use TDD: I mock out my interfaces I use IOC so
Is it possible to use PolyMorphism when using Templates? For example, I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.