Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Um pouco da origem para chegar no WSGI

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Um pouco da origem para chegar no WSGI

Avatar for Roger Camargo

Roger Camargo

November 16, 2022

More Decks by Roger Camargo

Other Decks in Programming

Transcript

  1. GET /mypage.html HTTP/1.0 User-Agent: NCSA_Mosaic/2.0 (Windows 3.1) 200 OK Date:

    Tue, 15 Nov 1994 08:12:31 GMT Server: CERN/3.0 libwww/2.17 Content-Type: text/html <HTML> A page with an image <IMG SRC="/myimage.gif"> </HTML> https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP Exemplo request/response
  2. CLIENT SERVER <form action=”/cgi/form.py” method=”post”> <input name=”full_name”> <input name=”email”> <input

    name=”message”> <input type=”submit” value=”Submit”> </form> REQUEST HTTP SERVER RUN SCRIPT + Print output ENV VARs read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'}); Perl Bash Python
  3. CLIENT SERVER REQUEST HTTP SERVER RUN SCRIPT + Print output

    HTTP SERVER RESPONSE print(“Contato Enviado!”) Contato Enviado!
  4. - Muitos http servers - Muitas formas de nomear variáveis

    para rodar scripts - Scripts não eram portáveis entre diferentes http web servers - Desenvolvedores queriam um padrão para nomear as variáveis e deixar scripts portáveis e padronizados Problemas no início dos forms:
  5. The Dark Side of the Moon CGI Common Gateway Interface

    (specification) 1993 início 1997 mais popular https://en.wikipedia.org/wiki/Common_Gateway_Interface https://www.jmarshall.com/easy/cgi/portuguese/
  6. Com diversos Python Web frameworks… Precisava padronizar a forma que

    os scripts eram chamados e não só as variáveis de ambientes…