프로퍼티 | 타입 | 설명 | |
---|---|---|---|
ns | NetworkStream |
메소드 | 설명 | |
---|---|---|
HttpProcessor ( Socket s, String HTTP_DocumentRoot, sones.storage.TinyOnDiskStorage Storage, sones.storage.TinyOnDiskStorage LatitudeStorage, hacs.xs1.configuration.XS1Configuration _XS1_Configuration, hacs.ConsoleOutputLogger Logger, |
Each HTTP processor object handles one client. If Keep-Alive is enabled then this object will be reused for subsequent requests until the client breaks keep-alive. This usually happens when it times out. Because this could easily lead to a DoS attack, we keep track of the number of open processors and only allow 100 to be persistent active at any one time. Additionally, we do not allow more than 500 outstanding requests.
|
|
getFileExtension ( string filename ) : string |
extracts the file extension from a filename
|
|
parseRequest ( ) : bool |
parses the Request and determines if it's actually a valid one or not
|
|
process ( ) : void |
This is the main method of each thread of HTTP processing. We pass this method to the thread constructor when starting a new connection.
|
|
readHeaders ( ) : bool |
Reads the headers of the request and determines if they are valid or not
|
|
writeError ( int status, string message ) : void | ||
writeFailure ( ) : void | ||
writeForbidden ( ) : void | ||
writeNotAuthorized ( String realm ) : void | ||
writeResult ( int status, string message, long length ) : void | ||
writeResult ( int status, string message, long length, string mimetype ) : void | ||
writeSuccess ( long length ) : void | ||
writeSuccess ( long length, string mimetype ) : void | ||
writeURL ( ) : void |
We need to make sure that the url that we are trying to treat as a file lies below the document root of the http server so that people can't grab random files off your computer while this is running.
|
메소드 | 설명 | |
---|---|---|
ForwardToIndexHTML ( String Message ) : String | ||
ForwardToLastPage ( String Message ) : String | ||
ForwardToPage ( String Message, String URL ) : String |
public HttpProcessor ( Socket s, String HTTP_DocumentRoot, sones.storage.TinyOnDiskStorage Storage, sones.storage.TinyOnDiskStorage LatitudeStorage, hacs.xs1.configuration.XS1Configuration _XS1_Configuration, hacs.ConsoleOutputLogger Logger, |
||
s | Socket | the Socket to work with |
HTTP_DocumentRoot | String | |
Storage | sones.storage.TinyOnDiskStorage | |
LatitudeStorage | sones.storage.TinyOnDiskStorage | |
_XS1_Configuration | hacs.xs1.configuration.XS1Configuration | |
Logger | hacs.ConsoleOutputLogger | |
ELVMAXMonitoring | ||
AuthEnabled | bool | |
Uname | String | |
Pword | String | |
StartAddrFilter | String | |
리턴 | System |
public getFileExtension ( string filename ) : string | ||
filename | string | the complete filename or path+filename |
리턴 | string |
public writeError ( int status, string message ) : void | ||
status | int | |
message | string | |
리턴 | void |
public writeResult ( int status, string message, long length ) : void | ||
status | int | |
message | string | |
length | long | |
리턴 | void |
public writeResult ( int status, string message, long length, string mimetype ) : void | ||
status | int | |
message | string | |
length | long | |
mimetype | string | |
리턴 | void |
public writeSuccess ( long length, string mimetype ) : void | ||
length | long | |
mimetype | string | |
리턴 | void |