Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
N
Networking
Fetchers
HTTP
Commits
b14a5687
Commit
b14a5687
authored
Feb 18, 1998
by
Stewart Brodie
Browse files
Version number increase for all modules for final Expresso release.
parent
8e99b0ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
26 deletions
+49
-26
Makefile
Makefile
+3
-3
c/cookie
c/cookie
+41
-22
c/module
c/module
+2
-0
cmhg/HttpHdr
cmhg/HttpHdr
+3
-1
No files found.
Makefile
View file @
b14a5687
...
...
@@ -53,7 +53,7 @@ CPFLAGS = ~cfr~v
WFLAGS
=
~c~v
CFLAGS
=
-c
-depend
!
Depend
${INCLUDES}
-zM
-Wp
-ffah
-zps1
${DFLAGS}
DFLAGS
=
-D
${SYSTEM}
-DCOMPAT_INET4
-DCOOKIE
-UTML
-UTRACE
DFLAGS
=
-D
${SYSTEM}
-DCOMPAT_INET4
-DCOOKIE
-UTML
-UTRACE
-DUSE_SYSLOG
ROMFLAGS
=
-DROM
INCLUDES
=
-ITCPIPLibs
:,C:
...
...
@@ -168,9 +168,9 @@ rom_link:
${MSGSF}
:
@.Resources.${LOCALE}.Messages
resgen messages_file
${MSGSF}
Resources.
${LOCALE}
.Messages
${RESFSDIR}
.Messages
${RAM_MODULE}
:
${RAM_OBJS} ${MSGSF} ${TCPIPLIBS}
${RAM_MODULE}
:
${RAM_OBJS} ${MSGSF} ${TCPIPLIBS}
${CLIB}
${mkdir}
rm
${
T
LD}
-o
$@
-module
${RAM_OBJS}
${MSGSF}
${TCPIPLIBS}
${LD}
-o
$@
-module
${RAM_OBJS}
${MSGSF}
${TCPIPLIBS}
${CLIB}
Access
$@
RW/R
o.moduleRAM
:
module.c
...
...
c/cookie
View file @
b14a5687
...
...
@@ -112,8 +112,6 @@ typedef enum {
#ifdef TRACE
#define USE_SYSLOG
#ifdef USE_SYSLOG
#include "<syslog$dir>.C-veneer.h.syslog"
#endif
...
...
@@ -584,6 +582,7 @@ static void write_cookies_to_file(void)
static
char
*
cookie_look_for_cookies
(
char
*
domain
,
char
*
path
,
Session
*
ses
)
{
size_t
pointer
=
0
,
max_size
=
0
;
size_t
num_cookies
=
0
;
CookieDomain
*
cookie_domain
;
Cookie
*
cookie
;
const
time_t
current_time
=
time
(
NULL
);
...
...
@@ -616,6 +615,7 @@ static char *cookie_look_for_cookies(char *domain, char *path, Session *ses)
if
(
cookie
->
expires
<
current_time
)
continue
;
size
=
strlen
(
cookie
->
name
)
+
strlen
(
cookie
->
value
)
+
sizeof
(
"; = "
);
if
(
num_cookies
>
0
)
size
+=
sizeof
(
"; "
);
if
(
cookie
->
version
>
0
)
{
size
+=
sizeof
(
"; $Version=XXXXXXXX; $Domain= ; $Path= ;"
);
size
+=
cookie
->
domain
!=
NULL
?
strlen
(
cookie
->
domain
)
:
0
;
...
...
@@ -642,6 +642,10 @@ static char *cookie_look_for_cookies(char *domain, char *path, Session *ses)
}
/* Write the cookie into the output buffer */
if
(
num_cookies
>
0
)
{
pointer
+=
sprintf
(
buffer
+
pointer
,
"; "
);
}
if
(
cookie
->
version
>
0
)
{
pointer
+=
sprintf
(
buffer
+
pointer
,
"$Version=%i; %s=%s"
,
cookie
->
version
,
cookie
->
name
,
cookie
->
value
);
...
...
@@ -656,28 +660,27 @@ static char *cookie_look_for_cookies(char *domain, char *path, Session *ses)
if
(
strcmp
(
cookie
->
path
,
path
)
!=
0
)
{
pointer
+=
sprintf
(
buffer
+
pointer
,
"; $Path=%s"
,
cookie
->
path
);
}
cookie
->
last_access
=
current_time
;
}
else
{
pointer
+=
sprintf
(
buffer
+
pointer
,
"%s=%s"
,
cookie
->
name
,
cookie
->
value
);
}
#ifdef TRACE
cookie_debug
(
"Adding cookie `%s'
\n
"
,
buffer
);
#endif
http_add_header
(
&
ses
->
headers
,
"Cookie"
,
buffer
);
free
(
buffer
);
buffer
=
NULL
;
pointer
=
0
;
max_size
=
0
;
cookie
->
last_access
=
current_time
;
++
num_cookies
;
}
}
if
(
buffer
)
{
free
(
buffer
);
buffer
=
NULL
;
}
return
buffer
;
if
(
buffer
!=
NULL
)
{
#ifdef TRACE
cookie_debug
(
"Adding cookie header: `%s'
\n
"
,
buffer
);
#endif
http_add_header
(
&
ses
->
headers
,
"Cookie"
,
buffer
);
free
(
buffer
);
buffer
=
NULL
;
pointer
=
0
;
max_size
=
0
;
}
return
NULL
;
}
static
char
*
cookie_process_path
(
const
char
*
uri
)
...
...
@@ -896,12 +899,22 @@ static void cookie_clean(void)
expire_cookies
(
best_domain
);
}
static
Cookie
*
cookie_
match_name_
in_d
omain
(
CookieDomain
*
domain
,
const
char
*
name
)
static
Cookie
*
cookie_
f
in
d
_d
uplicate
(
CookieDomain
*
domain
,
Cookie
*
match
)
{
Cookie
*
cookie
;
Cookie
*
cookie
;
for
(
cookie
=
domain
->
cookie
;
cookie
;
cookie
=
cookie
->
next
)
{
if
(
strcmp
(
cookie
->
name
,
name
)
==
0
)
return
cookie
;
if
(
strcmp
(
cookie
->
name
,
match
->
name
)
==
0
)
{
if
(
strcmp
(
cookie
->
domain
,
match
->
domain
)
==
0
&&
strcmp
(
cookie
->
path
,
match
->
path
)
==
0
)
{
#ifdef TRACE
cookie_debug
(
"duplicate finder: matching cookie
\n
"
);
cookie_debug
(
" (%s,%s,%s) == (%s,%s,%s)
\n
"
,
cookie
->
name
,
cookie
->
domain
,
cookie
->
path
,
match
->
name
,
match
->
domain
,
match
->
path
);
#endif
return
cookie
;
}
}
}
return
NULL
;
...
...
@@ -987,10 +1000,10 @@ static void cookie_link_to_domain(CookieDomain *head, Cookie *cookie)
Cookie
*
insertion_point
;
const
char
*
const
path
=
cookie
->
path
;
while
((
insertion_point
=
cookie_
match_name_
in_d
omain
(
head
,
cookie
->
name
))
!=
NULL
)
{
while
((
insertion_point
=
cookie_
f
in
d
_d
uplicate
(
head
,
cookie
))
!=
NULL
)
{
#ifdef TRACE
cookie_debug
(
"Deleting duplicate (%p) domain=%s, name=%s
\n
"
,
insertion_point
,
insertion_point
->
domain
,
insertion_point
->
name
);
cookie_debug
(
"Deleting duplicate (%p) domain=%s, name=%s
, path=%s
\n
"
,
insertion_point
,
insertion_point
->
domain
,
insertion_point
->
name
,
insertion_point
->
path
);
#endif
remove_cookie_from_list
(
insertion_point
,
NOT_DOMAIN
);
destroy_cookie
(
insertion_point
);
...
...
@@ -1395,6 +1408,9 @@ static void act_on_cookie_giveup(Cookie **pcookie)
Cookie
*
const
cookie
=
*
pcookie
;
if
(
cookie
!=
NULL
)
{
#ifdef TRACE
cookie_debug
(
"act_on_cookie_giveup: %p
\n
"
,
cookie
);
#endif
remove_cookie_from_queue
(
cookie
);
destroy_cookie
(
cookie
);
*
pcookie
=
NULL
;
...
...
@@ -1478,6 +1494,9 @@ static void act_on_cookie(char *string, Session *s, char *host, char *path)
}
else
if
(
Strcmp_ci
(
string
,
"path"
)
==
0
&&
current_cookie
)
{
/* Set new path */
#ifdef TRACE
cookie_debug
(
"Path override to `%s'
\n
"
,
value
);
#endif
if
(
check_path_valid
(
path
,
value
))
{
/* Delete default path */
if
(
current_cookie
->
path
!=
NULL
)
{
...
...
c/module
View file @
b14a5687
...
...
@@ -57,8 +57,10 @@ extern int messages_file(void);
#endif
#ifndef ROM
#ifdef DEFINE_ERRNO
int
__errno
;
#endif
#endif
/*************************************************************/
...
...
cmhg/HttpHdr
View file @
b14a5687
...
...
@@ -21,7 +21,7 @@
title-string:
AcornHTTP
; Version information
help-string:
Acorn_HTTP
0
.
7
3
help-string:
Acorn_HTTP
0
.
7
5
; Initialisation routine.
initialisation-code:
module_init
...
...
@@ -53,3 +53,5 @@ service-call-handler: service_handler &83E00
vector-handlers:
callevery_entry
/
callevery_handler
,
callback_entry
/
callback_handler
date-string:
17
Feb
1998
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment