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 8459547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:21:40+00:00 2026-06-10T13:21:40+00:00

I am trying to understand the functionality of WSGI and need some help. So

  • 0

I am trying to understand the functionality of WSGI and need some help.

So far I know that it is kind of a middleware between servers and applications, used for interfacing different application frameworks (that reside in the server side) with the application, provided that the framework in question has a WSGI adapter. Continuing the theoretical part, I know that for server to communicate with the application, server calls a callable (that takes two arguments: environment variables and start_response function). Here start_response function is provided by the server (?) and used by the application with a response status and header followed by response body.

I understand little of what I wrote above, so here are newbie questions:
1) What is the general call flow ? Application will provide the server with a callable and then server would invoke the application using that callable and using env_vars and start_response function as arguments?

2) What confuses me the most is that the application is sending the request headers and then it sends the response body as well. What type of request is this ?

Please enlighten me as I am unable to get my head around this stuff.

Thanks!

  • 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-10T13:21:41+00:00Added an answer on June 10, 2026 at 1:21 pm

    The call flow is as follow:

    1. The server got a http connection,
    2. server parsed the http request line and headers, read the body,
    3. server populates the environ dict according to the request,
    4. server calls application callable with environ and start_response as arguments,
    5. application callable calls start_response with response status and response headers,
    6. application return response body to the server,
    7. server send the http response to the client.

    For your second problem, the request/response is an interface defined by wsgi protocol (e.g. status = ‘200 OK’, response_headers = [(‘Content-type’, ‘text/plain’)]), not the same thing with http request/response.

    You can browse the stand library module wsgiref as reference.

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

Sidebar

Related Questions

I am trying to understand some code. It is a small program that prints
I'm trying to understand the mechanics of creating a password reset functionality for a
I am new to spring and trying to understand the functionality of the idref
I'm trying to understand how WHOIS works. I know there are third-parties and Gems
I am trying to understand the concept of an interface in java so far
I'm trying to implement some functionality of BigInteger s as a personal programming exercise.
I am trying to replicate the functionality that users see when they go into
I have created a small application, trying to understand the functionality of the LoaderManager
I am trying to explain the details so that this is easy to understand.
I am trying to understand the difference between JsonResult and Ajax.BeginForm work? Can someone

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.