NetTalk Central

Author Topic: SetHeader200  (Read 3319 times)

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
SetHeader200
« on: September 28, 2016, 01:31:27 PM »
Hi Bruce
in NetWeb.clw you have some code like this:

Code: [Select]
NetWebServerWorkerBase.SetHeader200 Procedure(Long p_cache=net:Cache)
  code
      !self.HeaderDetails.ContentLength is set before, or after, calling this
  if self.ReplyResponseNumber <> ''
    self.HeaderDetails.ResponseNumber = self.ReplyResponseNumber
  else
    self.HeaderDetails.ResponseNumber = '200'
  end
  self.HeaderDetails.ResponseString = 'OK'
...
if In a WebServiceMethod I set the p_web.ResponseNumber to say 404
i still get the ResponseString  as 'OK'
Could you make that conditional so i could set p_web.ResponseString =  "NOT FOUND" at the same time?
or perhaps provide a more generalized way(function) of populating  the ResponseString  based on the response number.

poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: SetHeader200
« Reply #1 on: September 28, 2016, 11:11:30 PM »
I've added
p_web.ReplyResponseString
to build 9.14

Cheers
Bruce