src: Don't output priority if NGHTTP2_FLAG_PRIORITY is not set

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-09 21:34:28 +09:00
parent c7c283f3a9
commit ce53d7bd9e
1 changed files with 5 additions and 2 deletions

View File

@ -331,8 +331,11 @@ void print_frame(print_type ptype, const nghttp2_frame *frame)
break; break;
case NGHTTP2_HEADERS: case NGHTTP2_HEADERS:
print_frame_attr_indent(); print_frame_attr_indent();
fprintf(outfile, "(pri=%d, padlen=%zu)\n", fprintf(outfile, "(");
frame->headers.pri, frame->headers.padlen); if(frame->hd.flags & NGHTTP2_FLAG_PRIORITY) {
fprintf(outfile, "pri=%d, ", frame->headers.pri);
}
fprintf(outfile, "padlen=%zu)\n", frame->headers.padlen);
switch(frame->headers.cat) { switch(frame->headers.cat) {
case NGHTTP2_HCAT_REQUEST: case NGHTTP2_HCAT_REQUEST:
print_frame_attr_indent(); print_frame_attr_indent();