mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Release 2.7.1-1
SVN revision: 2002
This commit is contained in:
parent
bd7ff5eeba
commit
6b7f08c081
@ -5,7 +5,7 @@ On PC6562:
|
|||||||
|
|
||||||
- Put all new options in doc/config.html
|
- Put all new options in doc/config.html
|
||||||
- Increse version in elogd.c
|
- Increse version in elogd.c
|
||||||
- Do the same in doc/index.html
|
- Do the same in doc/index.html and index_d.html
|
||||||
- Modify ChangeLog
|
- Modify ChangeLog
|
||||||
- Add release date to ChangeLog
|
- Add release date to ChangeLog
|
||||||
- Do a "make indent"
|
- Do a "make indent"
|
||||||
|
|||||||
@ -1,3 +1,31 @@
|
|||||||
|
Version 2.7.1, released Jan. 22th, 2008
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
- Set current encoding to ELCode if 'allowed encoding = 3'
|
||||||
|
- Improved sorting speed when 100000's entries are present
|
||||||
|
- Fixed bug with truncated entries
|
||||||
|
- Implemented 'sort attributes = ID'
|
||||||
|
- Changed default encoding to 2
|
||||||
|
- Do not translate 'activate' (gives problems by email program encoding)
|
||||||
|
- Implemented pipelining
|
||||||
|
- Changed default for allowed encoding
|
||||||
|
- Fixed possible buffer overflow
|
||||||
|
- Fixed possible endless loop in replace_inline_img
|
||||||
|
- Convert "elog:/<n>" to "<ID>/<n>" for HTML encoding
|
||||||
|
- Display icon comment also in threaded and summary view
|
||||||
|
- Fixed & co. in summary view
|
||||||
|
- Fixed umlaute in summary display
|
||||||
|
- Added search button for quick filters for MSIE
|
||||||
|
- Upgraded to FCKeditor 2.5beta
|
||||||
|
- Implemented 'Use Email URL'
|
||||||
|
- Fixed bug with --+Text+--
|
||||||
|
- Implement InsertLink
|
||||||
|
- Fixed double sent attachments in email notifications
|
||||||
|
- Added CTRL-N for new list item, thanks to Bill Pier
|
||||||
|
- Changed resource directoy to be removed on uninstall
|
||||||
|
- Added FCKeditor extraction to Makefile
|
||||||
|
- Fixed email notification with HTML inline images
|
||||||
|
|
||||||
Version 2.7.0, released Oct. 25th, 2007
|
Version 2.7.0, released Oct. 25th, 2007
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
[<a class="nav" href="#links">Links</a>] * </div>
|
[<a class="nav" href="#links">Links</a>] * </div>
|
||||||
<P class="Sub">Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt@psi.ch">
|
<P class="Sub">Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt@psi.ch">
|
||||||
Stefan Ritt</a></P>
|
Stefan Ritt</a></P>
|
||||||
<div class="version">Current version is : 2.7.0</div>
|
<div class="version">Current version is : 2.7.1</div>
|
||||||
<center>
|
<center>
|
||||||
<a href="http://www.softpedia.com/progClean/ELOG-Clean-30897.html"><img border="0" src="http://www.softpedia.com/images/spyward/softpedia_free_award_f.gif" alt="certificate" title="certificate" /></a>
|
<a href="http://www.softpedia.com/progClean/ELOG-Clean-30897.html"><img border="0" src="http://www.softpedia.com/images/spyward/softpedia_free_award_f.gif" alt="certificate" title="certificate" /></a>
|
||||||
</center>
|
</center>
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
[<a class="nav" href="#links">Links</a>] * </div>
|
[<a class="nav" href="#links">Links</a>] * </div>
|
||||||
<P class="Sub">Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt@psi.ch">
|
<P class="Sub">Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt@psi.ch">
|
||||||
Stefan Ritt</a></P>
|
Stefan Ritt</a></P>
|
||||||
<div class="version">Current version is : 2.7.0</div>
|
<div class="version">Current version is : 2.7.1</div>
|
||||||
<center>
|
<center>
|
||||||
<a href="http://www.softpedia.com/progClean/ELOG-Clean-30897.html"><img border="0" src="http://www.softpedia.com/images/spyward/softpedia_free_award_f.gif" alt="certificate" title="certificate" /></a>
|
<a href="http://www.softpedia.com/progClean/ELOG-Clean-30897.html"><img border="0" src="http://www.softpedia.com/images/spyward/softpedia_free_award_f.gif" alt="certificate" title="certificate" /></a>
|
||||||
|
|
||||||
|
|||||||
@ -437,7 +437,6 @@ unspecified = ospecifiserad
|
|||||||
To subscribe to any logbook, click on 'Config' in that logbook = För att prenumerera på en loggbok, klicka på 'Konfigurera' i den loggboken
|
To subscribe to any logbook, click on 'Config' in that logbook = För att prenumerera på en loggbok, klicka på 'Konfigurera' i den loggboken
|
||||||
ELOG XML import = ELOG XML-import
|
ELOG XML import = ELOG XML-import
|
||||||
Derive attributes from XML file = Hämta attribut från XML-fil
|
Derive attributes from XML file = Hämta attribut från XML-fil
|
||||||
Keep original entry IDs (may overwrite existing entries, but is required if imported entries contain replies) = Behåll original post-ID (kan skriva över befintliga poster, men krävs om importerade poster innehåller svar)
|
|
||||||
XML filename = XML filnamn
|
XML filename = XML filnamn
|
||||||
Invalid date format = Ogiltigt datumformat
|
Invalid date format = Ogiltigt datumformat
|
||||||
XML file does not contain %s element = XML-filen innehåller inte %s element
|
XML file does not contain %s element = XML-filen innehåller inte %s element
|
||||||
|
|||||||
@ -265,7 +265,7 @@ void convert_crlf(char *buffer, int bufsize)
|
|||||||
p = buffer;
|
p = buffer;
|
||||||
while ((p = strstr(p, "\\n")) != NULL) {
|
while ((p = strstr(p, "\\n")) != NULL) {
|
||||||
|
|
||||||
if ((int)p - (int)buffer < bufsize-2) {
|
if ((int) p - (int) buffer < bufsize - 2) {
|
||||||
*(p++) = '\r';
|
*(p++) = '\r';
|
||||||
*(p++) = '\n';
|
*(p++) = '\n';
|
||||||
}
|
}
|
||||||
|
|||||||
75
src/elogd.c
75
src/elogd.c
@ -10,7 +10,7 @@
|
|||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
|
|
||||||
/* Version of ELOG */
|
/* Version of ELOG */
|
||||||
#define VERSION "2.7.0"
|
#define VERSION "2.7.1"
|
||||||
char svn_revision[] = "$Id$";
|
char svn_revision[] = "$Id$";
|
||||||
|
|
||||||
/* ELOG identification */
|
/* ELOG identification */
|
||||||
@ -4374,7 +4374,8 @@ int el_retrieve(LOGBOOK * lbs,
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
int el_submit_attachment(LOGBOOK * lbs, const char *afilename, const char *buffer, int buffer_size, char *full_name)
|
int el_submit_attachment(LOGBOOK * lbs, const char *afilename, const char *buffer, int buffer_size,
|
||||||
|
char *full_name)
|
||||||
{
|
{
|
||||||
char file_name[MAX_PATH_LENGTH], ext_file_name[MAX_PATH_LENGTH + 100], str[MAX_PATH_LENGTH], *p;
|
char file_name[MAX_PATH_LENGTH], ext_file_name[MAX_PATH_LENGTH + 100], str[MAX_PATH_LENGTH], *p;
|
||||||
int fh;
|
int fh;
|
||||||
@ -5522,8 +5523,8 @@ void replace_inline_img(char *str)
|
|||||||
pn++;
|
pn++;
|
||||||
if (*pn == '>')
|
if (*pn == '>')
|
||||||
pn++;
|
pn++;
|
||||||
sprintf(p, "<img src=\"cid:att%d@psi.ch\">", index-1);
|
sprintf(p, "<img src=\"cid:att%d@psi.ch\">", index - 1);
|
||||||
memmove(p+strlen(p), pn, strlen(pn)+1);
|
memmove(p + strlen(p), pn, strlen(pn) + 1);
|
||||||
p++;
|
p++;
|
||||||
} else
|
} else
|
||||||
p++;
|
p++;
|
||||||
@ -7172,7 +7173,8 @@ void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head,
|
|||||||
rsprintf("</head>\n");
|
rsprintf("</head>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_browser(char *browser) {
|
void show_browser(char *browser)
|
||||||
|
{
|
||||||
if (stristr(browser, "opera"))
|
if (stristr(browser, "opera"))
|
||||||
rsprintf("var browser = \"Opera\";\n");
|
rsprintf("var browser = \"Opera\";\n");
|
||||||
else if (stristr(browser, "konqueror"))
|
else if (stristr(browser, "konqueror"))
|
||||||
@ -9013,13 +9015,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
else
|
else
|
||||||
allowed_encoding = 7;
|
allowed_encoding = 7;
|
||||||
|
|
||||||
enc_selected = 2; /* Default is HTML */
|
enc_selected = 2; /* Default is HTML */
|
||||||
|
|
||||||
if (allowed_encoding == 2) /* select ELCode if the only one allowed */
|
if (allowed_encoding == 2) /* select ELCode if the only one allowed */
|
||||||
enc_selected = 0;
|
enc_selected = 0;
|
||||||
else if (allowed_encoding == 1) /* select plain if the only one allowed */
|
else if (allowed_encoding == 1) /* select plain if the only one allowed */
|
||||||
enc_selected = 1;
|
enc_selected = 1;
|
||||||
else if (allowed_encoding == 3) /* select ELCode if only plain and ELCode allowed */
|
else if (allowed_encoding == 3) /* select ELCode if only plain and ELCode allowed */
|
||||||
enc_selected = 0;
|
enc_selected = 0;
|
||||||
|
|
||||||
/* Overwrite from config file */
|
/* Overwrite from config file */
|
||||||
@ -16596,7 +16598,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
|
|||||||
|
|
||||||
if (attrib[i][0])
|
if (attrib[i][0])
|
||||||
rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">", attrib[i],
|
rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">", attrib[i],
|
||||||
comment, comment);
|
comment, comment);
|
||||||
|
|
||||||
rsprintf(" </td>");
|
rsprintf(" </td>");
|
||||||
}
|
}
|
||||||
@ -18884,7 +18886,7 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // if (filtering)
|
} // if (filtering)
|
||||||
|
|
||||||
/* evaluate "sort attributes" */
|
/* evaluate "sort attributes" */
|
||||||
if (sort_attributes) {
|
if (sort_attributes) {
|
||||||
@ -18908,8 +18910,7 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
|||||||
strlcat(msg_list[index].string, " ", sizeof(msg_list[index].string));
|
strlcat(msg_list[index].string, " ", sizeof(msg_list[index].string));
|
||||||
sprintf(str, "%08d", message_id);
|
sprintf(str, "%08d", message_id);
|
||||||
strlcat(msg_list[index].string, str, sizeof(msg_list[index].string));
|
strlcat(msg_list[index].string, str, sizeof(msg_list[index].string));
|
||||||
}
|
} else if (strieq(sort_attr[i], loc("Logbook"))) {
|
||||||
else if (strieq(sort_attr[i], loc("Logbook"))) {
|
|
||||||
strlcpy(msg_list[index].string, msg_list[index].lbs->name, 256);
|
strlcpy(msg_list[index].string, msg_list[index].lbs->name, 256);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -18984,7 +18985,7 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
|||||||
page_mid_head = message_id;
|
page_mid_head = message_id;
|
||||||
|
|
||||||
/* search message head in list */
|
/* search message head in list */
|
||||||
for (j = 0 ; j < n_msg ; j++)
|
for (j = 0; j < n_msg; j++)
|
||||||
if (msg_list[j].lbs == msg_list[index].lbs && msg_list[j].index == i)
|
if (msg_list[j].lbs == msg_list[index].lbs && msg_list[j].index == i)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -20090,7 +20091,7 @@ void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type
|
|||||||
|
|
||||||
base64_bufenc((unsigned char *) buffer, n, str);
|
base64_bufenc((unsigned char *) buffer, n, str);
|
||||||
|
|
||||||
if (length + (int)strlen(str) + 2 < size) {
|
if (length + (int) strlen(str) + 2 < size) {
|
||||||
strcpy(mail_text + length, str);
|
strcpy(mail_text + length, str);
|
||||||
length += strlen(str);
|
length += strlen(str);
|
||||||
strcpy(mail_text + length, "\r\n");
|
strcpy(mail_text + length, "\r\n");
|
||||||
@ -20893,7 +20894,8 @@ int set_attributes(LOGBOOK * lbs, char attributes[][NAME_LENGTH], int n)
|
|||||||
int submit_elog_reply(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NAME_LENGTH], char *text)
|
int submit_elog_reply(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NAME_LENGTH], char *text)
|
||||||
{
|
{
|
||||||
int n_reply, i, status;
|
int n_reply, i, status;
|
||||||
char str1[80], str2[80], att_file[MAX_ATTACHMENTS][256], reply_to[MAX_REPLY_TO * 10], list[MAX_N_ATTR][NAME_LENGTH];
|
char str1[80], str2[80], att_file[MAX_ATTACHMENTS][256], reply_to[MAX_REPLY_TO * 10],
|
||||||
|
list[MAX_N_ATTR][NAME_LENGTH];
|
||||||
|
|
||||||
status = el_retrieve(lbs, message_id, NULL, attr_list, NULL, 0,
|
status = el_retrieve(lbs, message_id, NULL, attr_list, NULL, 0,
|
||||||
NULL, NULL, NULL, reply_to, att_file, NULL, NULL);
|
NULL, NULL, NULL, reply_to, att_file, NULL, NULL);
|
||||||
@ -21419,8 +21421,7 @@ void submit_elog(LOGBOOK * lbs)
|
|||||||
sprintf(str, "elog:%d/", message_id);
|
sprintf(str, "elog:%d/", message_id);
|
||||||
strsubst(p, TEXT_SIZE, "elog:/", str);
|
strsubst(p, TEXT_SIZE, "elog:/", str);
|
||||||
el_submit(lbs, message_id, TRUE, date, attr_list, attrib, n_attr,
|
el_submit(lbs, message_id, TRUE, date, attr_list, attrib, n_attr,
|
||||||
p, in_reply_to, reply_to,
|
p, in_reply_to, reply_to, encoding, att_file, TRUE, NULL);
|
||||||
encoding, att_file, TRUE, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---- email notifications ----*/
|
/*---- email notifications ----*/
|
||||||
@ -24274,8 +24275,9 @@ void show_uploader_finished(LOGBOOK * lbs)
|
|||||||
rsprintf(" {\n");
|
rsprintf(" {\n");
|
||||||
rsprintf(" if (opener.document.title == \"FCKeditor\") {\n");
|
rsprintf(" if (opener.document.title == \"FCKeditor\") {\n");
|
||||||
rsprintf(" i = opener.parent.next_attachment;\n");
|
rsprintf(" i = opener.parent.next_attachment;\n");
|
||||||
rsprintf(" opener.FCKeditorAPI.GetInstance('Text').InsertHtml('<img alt=\"%s\" src=\"%s%s\" name=\"att'+i+'\">');\n",
|
rsprintf
|
||||||
att + 14, base_url, ref);
|
(" opener.FCKeditorAPI.GetInstance('Text').InsertHtml('<img alt=\"%s\" src=\"%s%s\" name=\"att'+i+'\">');\n",
|
||||||
|
att + 14, base_url, ref);
|
||||||
rsprintf(" opener.parent.document.form1.inlineatt.value = '%s';\n", att);
|
rsprintf(" opener.parent.document.form1.inlineatt.value = '%s';\n", att);
|
||||||
rsprintf(" opener.parent.document.form1.jcmd.value = 'Upload';\n");
|
rsprintf(" opener.parent.document.form1.jcmd.value = 'Upload';\n");
|
||||||
rsprintf(" opener.parent.document.form1.submit();\n");
|
rsprintf(" opener.parent.document.form1.submit();\n");
|
||||||
@ -25537,16 +25539,16 @@ void decode_post(char *logbook, LOGBOOK * lbs, const char *string, const char *b
|
|||||||
string = strstr(p, boundary) + strlen(boundary);
|
string = strstr(p, boundary) + strlen(boundary);
|
||||||
|
|
||||||
if (stricmp(item, "text") == 0) {
|
if (stricmp(item, "text") == 0) {
|
||||||
if ((int)string - (int)p > TEXT_SIZE) {
|
if ((int) string - (int) p > TEXT_SIZE) {
|
||||||
sprintf(str,
|
sprintf(str,
|
||||||
"Error: Entry text too big (%lu bytes). Please increase TEXT_SIZE and recompile elogd\n",
|
"Error: Entry text too big (%lu bytes). Please increase TEXT_SIZE and recompile elogd\n",
|
||||||
(unsigned long) ((int)string - (int)p));
|
(unsigned long) ((int) string - (int) p));
|
||||||
show_error(str);
|
show_error(str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strlcpy(_mtext, p, sizeof(_mtext));
|
strlcpy(_mtext, p, sizeof(_mtext));
|
||||||
if (strstr(_mtext, boundary))
|
if (strstr(_mtext, boundary))
|
||||||
*strstr(_mtext, boundary) = 0;
|
*strstr(_mtext, boundary) = 0;
|
||||||
ptmp = _mtext + (strlen(_mtext) - 1);
|
ptmp = _mtext + (strlen(_mtext) - 1);
|
||||||
while (*ptmp == '-')
|
while (*ptmp == '-')
|
||||||
*ptmp-- = 0;
|
*ptmp-- = 0;
|
||||||
@ -25555,7 +25557,7 @@ void decode_post(char *logbook, LOGBOOK * lbs, const char *string, const char *b
|
|||||||
} else {
|
} else {
|
||||||
strlcpy(str, p, sizeof(str));
|
strlcpy(str, p, sizeof(str));
|
||||||
if (strstr(str, boundary))
|
if (strstr(str, boundary))
|
||||||
*strstr(str, boundary) = 0;
|
*strstr(str, boundary) = 0;
|
||||||
ptmp = str + (strlen(str) - 1);
|
ptmp = str + (strlen(str) - 1);
|
||||||
while (*ptmp == '-')
|
while (*ptmp == '-')
|
||||||
*ptmp-- = 0;
|
*ptmp-- = 0;
|
||||||
@ -25706,11 +25708,11 @@ int process_http_request(const char *request, int i_conn)
|
|||||||
strlcpy(str, p, sizeof(str));
|
strlcpy(str, p, sizeof(str));
|
||||||
if (strchr(str, '\r'))
|
if (strchr(str, '\r'))
|
||||||
*strchr(str, '\r') = 0;
|
*strchr(str, '\r') = 0;
|
||||||
#ifdef OS_WINNT
|
#ifdef OS_WINNT
|
||||||
rem_addr.S_un.S_addr = inet_addr(str);
|
rem_addr.S_un.S_addr = inet_addr(str);
|
||||||
#else
|
#else
|
||||||
rem_addr.s_addr = inet_addr(str);
|
rem_addr.s_addr = inet_addr(str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (getcfg("global", "Resolve host names", str, sizeof(str)) && atoi(str) == 1) {
|
if (getcfg("global", "Resolve host names", str, sizeof(str)) && atoi(str) == 1) {
|
||||||
phe = gethostbyaddr((char *) &rem_addr, 4, PF_INET);
|
phe = gethostbyaddr((char *) &rem_addr, 4, PF_INET);
|
||||||
@ -25740,8 +25742,7 @@ int process_http_request(const char *request, int i_conn)
|
|||||||
return_length = 0;
|
return_length = 0;
|
||||||
|
|
||||||
/* extract logbook */
|
/* extract logbook */
|
||||||
if (strchr(request, '/') == NULL || strchr(request, '\r') == NULL
|
if (strchr(request, '/') == NULL || strchr(request, '\r') == NULL || strstr(request, "HTTP") == NULL) {
|
||||||
|| strstr(request, "HTTP") == NULL) {
|
|
||||||
/* invalid request, make valid */
|
/* invalid request, make valid */
|
||||||
return process_http_request("GET / HTTP/1.0\r\n\r\n", i_conn);
|
return process_http_request("GET / HTTP/1.0\r\n\r\n", i_conn);
|
||||||
}
|
}
|
||||||
@ -25792,7 +25793,7 @@ int process_http_request(const char *request, int i_conn)
|
|||||||
strcpy(logbook_enc, logbook);
|
strcpy(logbook_enc, logbook);
|
||||||
url_decode(logbook);
|
url_decode(logbook);
|
||||||
/* check for trailing '/' after logbook */
|
/* check for trailing '/' after logbook */
|
||||||
if (strncmp(request, "POST", 4) != 0) { // fix for konqueror
|
if (strncmp(request, "POST", 4) != 0) { // fix for konqueror
|
||||||
if (logbook[0] && *p == ' ') {
|
if (logbook[0] && *p == ' ') {
|
||||||
if (!chkext(logbook, ".css") && !chkext(logbook, ".htm")
|
if (!chkext(logbook, ".css") && !chkext(logbook, ".htm")
|
||||||
&& !chkext(logbook, ".gif") && !chkext(logbook, ".jpg")
|
&& !chkext(logbook, ".gif") && !chkext(logbook, ".jpg")
|
||||||
@ -26067,7 +26068,7 @@ int process_http_request(const char *request, int i_conn)
|
|||||||
return 0;
|
return 0;
|
||||||
*(strstr(request, "HTTP/1") - 1) = 0;
|
*(strstr(request, "HTTP/1") - 1) = 0;
|
||||||
/* strip logbook from path */
|
/* strip logbook from path */
|
||||||
strlcpy(str, request+5, sizeof(str));
|
strlcpy(str, request + 5, sizeof(str));
|
||||||
p = str;
|
p = str;
|
||||||
for (i = 0; *p && *p != '/' && *p != '?'; p++);
|
for (i = 0; *p && *p != '/' && *p != '?'; p++);
|
||||||
while (*p && *p == '/')
|
while (*p && *p == '/')
|
||||||
@ -26163,7 +26164,7 @@ void send_return(const char *net_buffer, int _sock)
|
|||||||
send(_sock, return_buffer, return_length, 0);
|
send(_sock, return_buffer, return_length, 0);
|
||||||
if (verbose > 1) {
|
if (verbose > 1) {
|
||||||
if (strrchr(net_buffer, '/'))
|
if (strrchr(net_buffer, '/'))
|
||||||
strlcpy(str, strrchr(net_buffer, '/')+1, sizeof(str));
|
strlcpy(str, strrchr(net_buffer, '/') + 1, sizeof(str));
|
||||||
else
|
else
|
||||||
str[0] = 0;
|
str[0] = 0;
|
||||||
eprintf("==== Return ================================\n");
|
eprintf("==== Return ================================\n");
|
||||||
@ -26608,7 +26609,7 @@ void server_loop(void)
|
|||||||
len = 0;
|
len = 0;
|
||||||
more_requests = 0;
|
more_requests = 0;
|
||||||
|
|
||||||
do { /* pipleline loop */
|
do { /* pipleline loop */
|
||||||
header_length = 0;
|
header_length = 0;
|
||||||
n_error = 0;
|
n_error = 0;
|
||||||
return_length = -1;
|
return_length = -1;
|
||||||
@ -26662,11 +26663,11 @@ void server_loop(void)
|
|||||||
pend = NULL;
|
pend = NULL;
|
||||||
if (strncmp(net_buffer, "GET", 3) == 0 && strncmp(net_buffer, "POST", 4) != 0) {
|
if (strncmp(net_buffer, "GET", 3) == 0 && strncmp(net_buffer, "POST", 4) != 0) {
|
||||||
if (len > 4 && strstr(net_buffer, "\r\n\r\n") != NULL) {
|
if (len > 4 && strstr(net_buffer, "\r\n\r\n") != NULL) {
|
||||||
pend = strstr(net_buffer, "\r\n\r\n")+4;
|
pend = strstr(net_buffer, "\r\n\r\n") + 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (len > 6 && strstr(net_buffer, "\r\r\n\r\r\n") != NULL) {
|
if (len > 6 && strstr(net_buffer, "\r\r\n\r\r\n") != NULL) {
|
||||||
pend = strstr(net_buffer, "\r\r\n\r\r\n")+6;
|
pend = strstr(net_buffer, "\r\r\n\r\r\n") + 6;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (strncmp(net_buffer, "POST", 4) == 0) {
|
} else if (strncmp(net_buffer, "POST", 4) == 0) {
|
||||||
@ -26762,9 +26763,9 @@ void server_loop(void)
|
|||||||
|
|
||||||
/* check if the net_buffer contains more than one request (pipelining) */
|
/* check if the net_buffer contains more than one request (pipelining) */
|
||||||
if (pend && *pend) {
|
if (pend && *pend) {
|
||||||
memmove(net_buffer, pend, strlen(pend)+1);
|
memmove(net_buffer, pend, strlen(pend) + 1);
|
||||||
more_requests = 1;
|
more_requests = 1;
|
||||||
len -= (int)pend - (int)net_buffer;
|
len -= (int) pend - (int) net_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (more_requests);
|
} while (more_requests);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user