77 } |
77 } |
78 |
78 |
79 pblock_kvinsert(pb_key_content_type, ct.ptr, ct.length, rq->srvhdrs); |
79 pblock_kvinsert(pb_key_content_type, ct.ptr, ct.length, rq->srvhdrs); |
80 return REQ_PROCEED; |
80 return REQ_PROCEED; |
81 } |
81 } |
|
82 |
|
83 int object_type_force_type(pblock *pb, Session *sn, Request *rq) { |
|
84 char *type = pblock_findkeyval(pb_key_type, pb); |
|
85 |
|
86 if(!type) { |
|
87 return REQ_NOACTION; |
|
88 } |
|
89 |
|
90 char *ct = pblock_findkeyval(pb_key_content_type, rq->srvhdrs); |
|
91 if(ct) { |
|
92 return REQ_NOACTION; |
|
93 } |
|
94 |
|
95 pblock_kvinsert(pb_key_content_type, type, strlen(type), rq->srvhdrs); |
|
96 |
|
97 return REQ_PROCEED; |
|
98 } |