Apache2
util_cookies.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef UTIL_COOKIES_H
23 #define UTIL_COOKIES_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
40 #include "apr_errno.h"
41 #include "httpd.h"
42 
43 #define SET_COOKIE "Set-Cookie"
44 #define SET_COOKIE2 "Set-Cookie2"
45 #define DEFAULT_ATTRS "HttpOnly;Secure;Version=1"
46 #define CLEAR_ATTRS "Version=1"
47 
48 typedef struct {
50  const char *name;
51  const char *encoded;
54 } ap_cookie_do;
55 
69  const char *val, const char *attrs,
70  long maxage, ...)
72 
86  const char *val, const char *attrs2,
87  long maxage, ...)
89 
101  const char *attrs, ...)
103 
115  const char *attrs2, ...)
117 
127 AP_DECLARE(apr_status_t) ap_cookie_read(request_rec * r, const char *name, const char **val,
128  int remove);
129 
137 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* !UTIL_COOKIES_H */
#define AP_FN_ATTR_SENTINEL
Definition: ap_config.h:231
APR Error Codes.
request_rec * r
Definition: mod_dav.h:518
const char * name
Definition: mod_dav.h:805
int apr_status_t
Definition: apr_errno.h:44
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
HTTP Daemon routines.
#define AP_DECLARE(x)
Definition: macros.h:1
A structure that represents the current request.
Definition: httpd.h:856