
hartill at ooo
Mar 13, 1995, 11:04 AM
Post #1 of 1
(85 views)
Permalink
|
|
apache-pre.tar.Z needs updating
|
|
apache-pre.tar.Z is missing this update that David gave to fix the "\r\n" or "\n" line break problem when using fgets. > Sorry about this, my fault. The top of scan_script_header should have read > int scan_script_header(FILE *f, FILE *fd) { > char w[MAX_STRING_LEN]; > char *l; > int p; > > while(1) { > /* why did this use getline, when we can use stdio buffered I/O?? */ > /* maybe we should put a timeout on this. */ > if (fgets(w, MAX_STRING_LEN-1, f) == NULL) > die(SERVER_ERROR,"httpd: malformed header from script",fd); > p = strlen(w); > if (p > 0 && w[p-1] == '\n') > { > if (p > 1 && w[p-2] == '\015') w[p-2] = '\0'; > else w[p-1] = '\0'; > } > ... > > I've tested this, and it fixes the problem. > > David. > On a related topic, 1.3 sends only "\n" as a line break for headers. I think we need to make it return "\r\n". rob h
|