httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@liege.ICS.UCI.EDU>
Subject Re: WWW Form Bug Report: "URLs get corrupted" on SunOS 4.x
Date Sat, 13 Jul 1996 07:24:56 GMT
Could someone explain what on earth this function is doing in mod_log_agent.c:

150: int agent_log_transaction(request_rec *orig)
151: {
152:     agent_log_state *cls = get_module_config (orig->server->module_config,
153:                                                &agent_log_module);
154:  
155:     char str[HUGE_STRING_LEN];
156:     char *agent;
157:     request_rec *r;
158:  
159:     if(cls->agent_fd <0)
160:       return OK;
161:  
162:     for (r = orig; r->next; r = r->next)
163:         continue;
164:     if (*cls->fname == '\0')    /* Don't log agent */
165:         return DECLINED;
166:  
167:     agent = table_get(orig->headers_in, "User-Agent");
168:     if(agent != NULL)
169:       {
170:         sprintf(str, "%s\n", agent);
171:         write(cls->agent_fd, str, strlen(str));
172:       }
173:  
174:     return OK;
175: }

I think I understand every part of it except

162:     for (r = orig; r->next; r = r->next)
163:         continue;

which is a complete mystery, and

164:     if (*cls->fname == '\0')    /* Don't log agent */
165:         return DECLINED;

which appears to duplicate 159, right?

.....Roy

Mime
View raw message