> -----Ursprüngliche Nachricht-----
> Von: Adam Hasselbalch Hansen
> Gesendet: Dienstag, 18. September 2007 12:25
> An: [email protected]
> Betreff: [PATCH 43415] Logging remote port.
>
>
> I have created a patch for httpd 2.2.6, giving the additional
> LogFormat
> directive %R, which logs the port of the host making the request.
>
> This is due to new legislation in Denmark, requiring ISPs and hosting
> companies to log the originating port of all traffic.
5 comments:
1. Please provide a patch against trunk.
2. Please also add a patch for the documentation.
3. I am not too happy with using %R, but to be honest I have no better proposal
:-).
Maybe other have.
4.
Instead of using
+static const char *log_remote_port(request_rec *r, char *a)
+{
+ return apr_psprintf(r->pool, "%u", r->connection->remote_addr->port);
+}
I would prefer
+static const char *log_remote_port(request_rec *r, char *a)
+{
+ return pfmt(r->pool, (int) (r->connection->remote_addr->port));
+}
like used for log_status.
5. Thanks for your patch :-).
Regards
Rüdiger