# http.log need conn.log filed

**URL:** <https://community.zeek.org/t/http-log-need-conn-log-filed/5095>\
**Category:** Zeek\
**Created:** [November 10, 2017, 12:30pm UTC](https://community.zeek.org/t/http-log-need-conn-log-filed/5095 "2017-11-10T12:30:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ps\_sunu](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@ps\_sunu](https://community.zeek.org/u/ps_sunu)\
**Post date:** [November 10, 2017, 12:30pm UTC](https://community.zeek.org/t/http-log-need-conn-log-filed/5095/1 "2017-11-10T12:30:38Z")

</div>

Hi,  
I need to copy conn record proto field into http.log script running but not htting the case my script

module TrackHTTP;  
redef LogAscii::use\_json=T;

redef record HTTP::Info += {  
proto: transport\_proto &optional &log;

};

event http\_reply(c: connection, version: string, code: count, reason: string) &priority= 10  
{

{  
print c$conn$proto;  
c$http$proto = c$conn$proto;  
}

# for ( id in c$conns ) {

# print f$conns;

# local c = c$conns[id];

#c$http$proto = c$conn$proto;

}

event http\_message\_done(c: connection, is\_orig: bool, stat: http\_message\_stat) &priority = 10  
{

if (c?$http && c?$conn )  
{  
print c$conn$proto;  
c$http$proto = c$conn$proto;  
}  
}

event http\_request(c: connection, method: string, original\_URI: string,  
unescaped\_URI: string, version: string) &priority=10  
{

if (c?$conn)  
{  
print c$conn$proto;  
c$http$proto = c$conn$proto;  
}

}

Regards,  
sunu

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:45pm UTC](https://community.zeek.org/t/http-log-need-conn-log-filed/5095/2 "2022-05-06T15:45:24Z")

</div>


