Server a la beard0
Author |
Message |
beard0
|
Posted: Wed Nov 24, 2004 3:23 pm Post subject: Server a la beard0 |
|
|
Seeing the server stuff up reminded me of my own server that I have been working on. It is, in my opinion at least, quite good, so I'll post it here for everyone to take a look at. It should be remebered however, that it is not perfect. I have taken precautions to make sure that someone cant /../ out of your web directory, but don't count on it - cause I dont wanna get sued :D. I have been playing around too with authentication techniques, but running into problems. I've been doing actually a fair bit of reading up on http, so a better, more compatible version should be comming.
Enjoy!
Description: |
|
Download |
Filename: |
Server.t |
Filesize: |
11.36 KB |
Downloaded: |
235 Time(s) |
Description: |
The settings file (remove .t) |
|
Download |
Filename: |
settings.ini.t |
Filesize: |
160 Bytes |
Downloaded: |
204 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Wed Nov 24, 2004 6:51 pm Post subject: (No subject) |
|
|
A couple of things.
I see:
code: | var headername, headerval : array 1 .. 20 of string |
And I think you need to use a record type.
code: | type Header :
record
name, value : string := ""
end record |
Then your array looks like:
code: | var headers : array 1 .. 20 of Header |
Also, I noticed you using those arrays in functions and procedures without passing them in as arguments. You shouldn't do this. Instead of:
code: | proc headerreset
for i : 1 .. 20
headername (i) := ""
headerval (i) := ""
end for
numh := 0
end headerreset |
Use something like:
code: | procedure headerReset (var headers : array 1 .. * of Header)
for i : 1 .. upper (headers)
headers (i).name := ""
headers (i).value := ""
end for
end headerReset |
|
|
|
|
|
|
r0ssar00
|
Posted: Tue Jan 18, 2005 10:58 am Post subject: (No subject) |
|
|
this is one helluva server, compared to others ive seen
|
|
|
|
|
|
|
|