Minor tweaks/fixes
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 32s

Add example config using "_FILE" variables.

Increase limit of config value size from 256 to 1024.
This commit is contained in:
Stephen Seo 2024-09-06 12:49:32 +09:00
parent b12029984f
commit d89117430d
3 changed files with 53 additions and 7 deletions

View file

@ -1,6 +1,34 @@
PATH=/ PATH=/
HTML='''<h1>Test HTML</h1><br> HTML='''
<h2>{{{Var}}}</h2> <html>
<head>
<style>
body {
color: #FFF;
background-color: #333;
}
a {
color: #AAF;
}
a:link {
color: #AAF;
}
a:visited {
color: #88B;
}
a:focus a:hover {
color: #DDF;
}
a:active {
color: #FFF;
}
</style>
</head>
<body>
<h1>Test HTML</h1><br>
<h2>{{{Var}}}</h2>
<h3><a href="/inner">To inner.</a></h3>
</body>
''' '''
Var='''Test var value''' Var='''Test var value'''

View file

@ -1,15 +1,33 @@
<html> <html>
<head> <head>
<style> <style>
body { body {
color: #FFF; color: #FFF;
background-color: #333; background-color: #333;
} }
a {
color: #AAF;
}
a:link {
color: #AAF;
}
a:visited {
color: #88B;
}
a:focus a:hover {
color: #DDF;
}
a:active {
color: #FFF;
}
</style> </style>
</head> </head>
<body> <body>
<h1>Inner</h1> <h1>Inner</h1>
{{{VAR_FILE}}} {{{VAR_FILE}}}
<br>
<a href="..">Back.</a>
</body> </body>
</html> </html>

View file

@ -19,7 +19,7 @@
#define C_SIMPLE_HTTP_SLEEP_NANOS 1000000 #define C_SIMPLE_HTTP_SLEEP_NANOS 1000000
#define C_SIMPLE_HTTP_RECV_BUF_SIZE 1024 #define C_SIMPLE_HTTP_RECV_BUF_SIZE 1024
#define C_SIMPLE_HTTP_CONFIG_BUF_SIZE 256 #define C_SIMPLE_HTTP_CONFIG_BUF_SIZE 1024
#define C_SIMPLE_HTTP_QUOTE_COUNT_MAX 3 #define C_SIMPLE_HTTP_QUOTE_COUNT_MAX 3
#endif #endif