Adding a New Header to the Inference Response Header #7810
-
I'm trying to add a new header to the response headers when triton is sent an inference request through http via the HTTPAPIServer::InferRequestClass::SetResponseHeader() function in src/http_server.cc, however even something as simple as adding this to the main body doesn't seem to work:
I don't see anything new in the response header when I use curl to post a generate request (the actual inference request works, it just doesn't show the header I added):
I was expecting a new line like NOTE: It's possible I didn't include my changes properly (I built just the server and copied the /opt/tritonserver/bin and /opt/tritonserver/lib binaries into a different image of tritonserver that had trt_backend so as to not have to build everything at once) and that's why this isn't working, I imagine the changes should be realized in the binaries in bin and lib? If no, where, and if so is SetResponseHeader() the correct place to add this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@krishung5 Would you happen to know the code pointer where headers in response are added? |
Beta Was this translation helpful? Give feedback.
Update: SetResponseHeader() is not called in the HandleGenerate() function which handles inference generate requests. Moved logic to there.