Changeset 86 for branches/DirectWeb/UWebServer.pas
- Timestamp:
- Dec 17, 2009, 8:25:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DirectWeb/UWebServer.pas
r85 r86 23 23 function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer 24 24 ): string; 25 procedure ServerInfo(Request: THTTPRequest; Response: THTTPResponse); 25 26 public 26 27 HTTPServer: THTTPServer; … … 144 145 OrderDirection: string; 145 146 Title: string; 146 LinkQuery: TQuery String;147 LinkQuery: TQueryParameterList; 147 148 begin 148 149 SqlDatabase := TSqlDatabase.Create; … … 165 166 ' ORDER BY ' + OrderColumn + ' ' + OrderDirection); 166 167 167 LinkQuery := TQuery String.Create;168 LinkQuery := TQueryParameterList.Create; 168 169 LinkQuery.Assign(Request.Query); 169 170 … … 209 210 OrderDirection: string; 210 211 Title: string; 211 LinkQuery: TQuery String;212 LinkQuery: TQueryParameterList; 212 213 begin 213 214 SqlDatabase := TSqlDatabase.Create; … … 237 238 end; 238 239 240 procedure TWebServer.ServerInfo(Request: THTTPRequest; Response: THTTPResponse); 241 var 242 I: Integer; 243 begin 244 with Response.Stream do begin 245 Response.Cookies.Values['Test'] := 'Halo'; 246 247 WriteString('<a href="?ServerInfo">Refresh</a>'); 248 249 WriteString('<h5>Request HTTP headers</h5>'); 250 251 for I := 0 to Request.Headers.Count - 1 do begin; 252 WriteString(Request.Headers.Strings[I] + '<br/>'); 253 end; 254 255 WriteString('<h5>Response HTTP headers</h5>'); 256 with Response.Stream do 257 for I := 0 to Response.Headers.Count - 1 do begin; 258 WriteString(Response.Headers.Strings[I] + '<br/>'); 259 end; 260 end; 261 end; 262 239 263 procedure TWebServer.SendIndex(Request: THTTPRequest; Response: THTTPResponse); 240 264 begin … … 297 321 Add('/ViewList', ViewList); 298 322 Add('/ViewItem', ViewItem); 323 Add('/ServerInfo', ServerInfo); 299 324 end; 300 325 end;
Note:
See TracChangeset
for help on using the changeset viewer.