asp versus cgi

D

davidj411

when i use cgi, i never get a 500 error but i can see how it might
take on overhead if many users are hitting the site at once. so to
avoid this, i looked into registering the python engine for ASP
requests.

when i use asp (C:\WINDOWS\system32\inetsrv\asp.dll fileversion
info:"--a-- W32i DLL ENU 5.1.2600.5512 shp 369,664 04-14-2008
asp.dll") , i get intermittent results. it either works or generates a
500 error. the error pattern is 200, 500, 200, 500, 200, 500 and so
on.

********************************************************
this is the ASP code when using GET method:

<%@ LANGUAGE = Python%>

<%
import sys
sys.stdout=sys.stdin
usr = Request.QueryString("usr")

Response.Write ("usr")
%>
**********************************************************
this is the ASP code when using the POST method
<%@ LANGUAGE = Python%>

<%
import sys
sys.stdout=sys.stdin
usr = Request.Form ("usr")
Response.Write (str(usr))
%>
**********************************************************

POST by the way seems to have a 100 kb limit so why ever use it unless
you need to keep the data out of the URL?)
 
T

Tim Roberts

davidj411 said:
when i use cgi, i never get a 500 error but i can see how it might
take on overhead if many users are hitting the site at once. so to
avoid this, i looked into registering the python engine for ASP
requests.

It is easy to overestimate the overhead of CGI. Unless you are getting
tens of requests every second, the overhead is insignificant, and CGI is
pretty easy to handle and debug.
********************************************************
this is the ASP code when using GET method:

<%@ LANGUAGE = Python%>

<%
import sys
sys.stdout=sys.stdin

What do you believe that statement is doing?
POST by the way seems to have a 100 kb limit so why ever use it unless
you need to keep the data out of the URL?)

No, POST doesn't have a 100 kB limit. When you upload a file to a web
site, it's sent through a POST request. However, keeping data out of the
URL is a big factor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top