File tree Expand file tree Collapse file tree 15 files changed +882
-84
lines changed
Includes/Libs/Implementations/Protocol/Http
Libs/Protocol/Implementations/Http Expand file tree Collapse file tree 15 files changed +882
-84
lines changed Original file line number Diff line number Diff line change
1
+ {*!
2
+ * Fano Web Framework (https:// fanoframework.github.io)
3
+ *
4
+ * @link https:// github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https:// github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ {------------ Begin TFpHttpServer-related------------------}
10
+ FpwebSvrConfigTypes,
11
+ FpwebAppServiceProviderImpl,
12
+ FpwebStdOutWriterImpl,
13
+ FpwebRequestImpl,
14
+ FpwebRequestFactoryImpl,
15
+ FpwebProcessorImpl,
16
+ {------------ End TFpHttpServer-related------------------}
Original file line number Diff line number Diff line change
1
+ {*!
2
+ * Fano Web Framework (https:// fanoframework.github.io)
3
+ *
4
+ * @link https:// github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https:// github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ {------------ Begin TFpHttpServer-related------------------}
10
+ TFpwebSvrConfig = FpwebSvrConfigTypes.TFpwebSvrConfig;
11
+ TFpwebAppServiceProvider = FpwebAppServiceProviderImpl.TFpwebAppServiceProvider;
12
+ TFpwebStdOutWriter = FpwebStdOutWriterImpl.TFpwebStdOutWriter;
13
+ TFpwebRequest = FpwebRequestImpl.TFpwebRequest;
14
+ TFpwebRequestFactory = FpwebRequestFactoryImpl.TFpwebRequestFactory;
15
+ TFpwebProcessor = FpwebProcessorImpl.TFpwebProcessor;
16
+ {------------ End TFpHttpServer-related------------------}
Original file line number Diff line number Diff line change
1
+ { *!
2
+ * Fano Web Framework (https://fanoframework.github.io)
3
+ *
4
+ * @link https://github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ { ------------ Begin TIdHTTPServer-related------------------}
10
+ { $IFDEF USE_INDY}
11
+ IndyAppServiceProviderImpl,
12
+ IndyStdOutWriterImpl,
13
+ IndyProcessorImpl,
14
+ { $ENDIF}
15
+ { ------------ End TIdHTTPServer-related------------------}
Original file line number Diff line number Diff line change
1
+ { *!
2
+ * Fano Web Framework (https://fanoframework.github.io)
3
+ *
4
+ * @link https://github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ { ------------ Begin TIdHTTPServer-related------------------}
10
+ { $IFDEF USE_INDY}
11
+ TIndyAppServiceProvider = IndyAppServiceProviderImpl.TINdyAppServiceProvider;
12
+ TIndyStdOutWriter = IndyStdOutWriterImpl.TIndyStdOutWriter;
13
+ TIndyProcessor = IndyProcessorImpl.TIndyProcessor;
14
+ { $ENDIF}
15
+ { ------------ End TFpHttpServer-related------------------}
Original file line number Diff line number Diff line change
1
+ { *!
2
+ * Fano Web Framework (https://fanoframework.github.io)
3
+ *
4
+ * @link https://github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ { ------------ Begin libmicrohttpd-related------------------}
10
+ { $IFDEF LIBMICROHTTPD}
11
+ MhdSvrConfigTypes,
12
+ MhdAppServiceProviderImpl,
13
+ MhdStdOutWriterImpl,
14
+ MhdProcessorImpl,
15
+ { $ENDIF}
16
+ { ------------ End libmicrohttpd-related------------------}
Original file line number Diff line number Diff line change
1
+ { *!
2
+ * Fano Web Framework (https://fanoframework.github.io)
3
+ *
4
+ * @link https://github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ { ------------ Begin libmicrohttpd-related------------------}
10
+ { $IFDEF LIBMICROHTTPD}
11
+ TMhdSvrConfig = MhdSvrConfigTypes.TMhdSvrConfig;
12
+ TMhdAppServiceProvider = MhdAppServiceProviderImpl.TMhdAppServiceProvider;
13
+ TMhdStdOutWriter = MhdStdOutWriterImpl.TMhdStdOutWriter;
14
+ TMhdProcessor = MhdProcessorImpl.TMhdProcessor;
15
+ { $ENDIF}
16
+ { ------------ End libmicrohttpd-related------------------}
Original file line number Diff line number Diff line change 6
6
* @license https ://github . com /fanoframework /fano /blob /master /LICENSE (MIT )
7
7
*}
8
8
9
- { ------------ Begin libmicrohttpd-related------------------}
10
- { $IFDEF LIBMICROHTTPD}
11
- MhdSvrConfigTypes,
12
- MhdAppServiceProviderImpl,
13
- MhdStdOutWriterImpl,
14
- MhdProcessorImpl,
15
- { $ENDIF}
16
- { ------------ End libmicrohttpd-related------------------}
9
+ HttpSvrConfigTypes ,
17
10
18
- { ------------ Begin TFpHttpServer-related------------------}
19
- FpwebSvrConfigTypes,
20
- FpwebAppServiceProviderImpl,
21
- FpwebStdOutWriterImpl,
22
- FpwebRequestImpl,
23
- FpwebRequestFactoryImpl,
24
- FpwebProcessorImpl,
25
- { ------------ End TFpHttpServer-related------------------}
11
+ {$INCLUDE Libmicrohttpd /implementations . inc }
12
+ {$INCLUDE Fpweb /implementations . inc }
13
+ {$INCLUDE Indy /implementations . inc }
Original file line number Diff line number Diff line change 6
6
* @license https ://github . com /fanoframework /fano /blob /master /LICENSE (MIT )
7
7
*}
8
8
9
- { ------------ Begin libmicrohttpd-related------------------}
10
- { $IFDEF LIBMICROHTTPD}
11
- TMhdSvrConfig = MhdSvrConfigTypes.TMhdSvrConfig;
12
- TMhdAppServiceProvider = MhdAppServiceProviderImpl.TMhdAppServiceProvider;
13
- TMhdStdOutWriter = MhdStdOutWriterImpl.TMhdStdOutWriter;
14
- TMhdProcessor = MhdProcessorImpl.TMhdProcessor;
15
- { $ENDIF}
16
- { ------------ End libmicrohttpd-related------------------}
9
+ THttpSvrConfig = HttpSvrConfigTypes . THttpSvrConfig ;
10
+
11
+ {$INCLUDE Libmicrohttpd /libs . aliases . inc }
12
+ {$INCLUDE Fpweb /libs . aliases . inc }
13
+ {$INCLUDE Indy /libs . aliases . inc }
17
14
18
- { ------------ Begin TFpHttpServer-related------------------}
19
- TFpwebSvrConfig = FpwebSvrConfigTypes.TFpwebSvrConfig;
20
- TFpwebAppServiceProvider = FpwebAppServiceProviderImpl.TFpwebAppServiceProvider;
21
- TFpwebStdOutWriter = FpwebStdOutWriterImpl.TFpwebStdOutWriter;
22
- TFpwebRequest = FpwebRequestImpl.TFpwebRequest;
23
- TFpwebRequestFactory = FpwebRequestFactoryImpl.TFpwebRequestFactory;
24
- TFpwebProcessor = FpwebProcessorImpl.TFpwebProcessor;
25
- { ------------ End TFpHttpServer-related------------------}
Original file line number Diff line number Diff line change @@ -13,35 +13,13 @@ interface
13
13
{ $MODE OBJFPC}
14
14
{ $H+}
15
15
16
+ uses
17
+
18
+ HttpSvrConfigTypes;
19
+
16
20
type
17
21
18
- TFpwebSvrConfig = record
19
- host : string;
20
- port : word;
21
- documentRoot : string;
22
- serverName : string;
23
- serverSoftware : string;
24
- serverSignature : string;
25
- serverAdmin : string;
26
- timeout : longword;
27
- // use IPv6
28
- useIPv6 : boolean;
29
- // use IPv6 = true and dualStack =true, support IPv4 and IPv6
30
- // use IPv6 = true and dualStack =false, IPv6 only
31
- dualStack : boolean;
32
-
33
- // set to true if using https
34
- useTLS : boolean;
35
- // SSL certificate key file path
36
- tlsKey : string;
37
- // SSL certificate file path
38
- tlsCert : string;
39
-
40
- threaded : boolean;
41
- threadPoolSize : integer;
42
-
43
- mimeTypesFile : string;
44
- end ;
22
+ TFpwebSvrConfig = THttpSvrConfig;
45
23
46
24
implementation
47
25
Original file line number Diff line number Diff line change
1
+ { *!
2
+ * Fano Web Framework (https://fanoframework.github.io)
3
+ *
4
+ * @link https://github.com/fanoframework/fano
5
+ * @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
6
+ * @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
7
+ *}
8
+
9
+ unit IndyResponseAwareIntf;
10
+
11
+ interface
12
+
13
+ { $MODE OBJFPC}
14
+ { $H+}
15
+
16
+ uses
17
+
18
+ IdBaseComponent,
19
+ IdComponent,
20
+ IdTCPServer,
21
+ IdCustomHTTPServer;
22
+
23
+ type
24
+
25
+ (* !------------------------------------------------
26
+ * interface for any class having maintain TIdHTTPServer
27
+ * response instance
28
+ *
29
+ * @author Zamrony P. Juhara <zamronypj@yahoo.com>
30
+ *-----------------------------------------------*)
31
+ IIndyResponseAware = interface
32
+ [' {92EB633E-DAB9-43E4-8DF5-92C15EECEDAA}' ]
33
+
34
+ (* !------------------------------------------------
35
+ * get TIdHTTPServer response connection
36
+ *-----------------------------------------------
37
+ * @return connection
38
+ *-----------------------------------------------*)
39
+ function getResponse () : TIdHTTPResponseInfo;
40
+
41
+ (* !------------------------------------------------
42
+ * set TIdHTTPServer response connection
43
+ *-----------------------------------------------*)
44
+ procedure setResponse (aresponse: TIdHTTPResponseInfo);
45
+
46
+ property response: TIdHTTPResponseInfo read getResponse write setResponse;
47
+ end ;
48
+
49
+ implementation
50
+
51
+ end .
You can’t perform that action at this time.
0 commit comments