No. Please share your installed plugin, not Trac. The installed plugin has
something wrong and the wrong leads the error.


On Wed, Mar 4, 2020 at 22:52 Velu Narasimman <[email protected]> wrote:

> Sorry, do you mean the Trac code? I am using trac 1.0.15 version and you
> can find the same here
> <https://download.edgewall.org/trac/Trac-1.0.15.tar.gz>. Now it is
> archived.
>
> On Wednesday, March 4, 2020 at 7:17:27 PM UTC+5:30, Jun Omae wrote:
>>
>> Please share entire of the plugin code. I believe the plugin has the
>> problem(s).
>>
>> On Wed, Mar 4, 2020 at 10:45 PM Velu Narasimman <[email protected]>
>> wrote:
>> >
>> > This error is happening in the core Trac package. Whom should I report
>> to? Also I am using similar code in few other area. There it works well.
>> >
>> > On Wednesday, March 4, 2020 at 1:58:46 PM UTC+5:30, Jun Omae wrote:
>> >>
>> >> That is due to Request.end_headers() called twice. Please report it to
>> >> the plugin maintainers.
>> >>
>> >> On Wed, Mar 4, 2020 at 2:42 PM Velu Narasimman <[email protected]>
>> wrote:
>> >> >
>> >> > Hi team,
>> >> >
>> >> >     I am facing this "headers have already been sent" error in an
>> AJAX call. I am not able to fix it. I need your hellp. Would be better if
>> someone could explain this issue.
>> >> >
>> >> > 2020-03-04 11:00:45,582 Trac[main] ERROR: [172.24.188.116] Internal
>> Server Error: <RequestWithSession "POST '/admin/pros users/users'">,
>> referrer 'https://prism30.aspiresys.com/Merlin/admin/pros%20users/users'
>> >> > Traceback (most recent call last):
>> >> >   File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/main.py",
>> line 631, in _dispatch_request
>> >> >     dispatcher.dispatch(req)
>> >> >   File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/main.py",
>> line 325, in dispatch
>> >> >     req.send(output, content_type or 'text/html')
>> >> >   File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/api.py",
>> line 556, in send
>> >> >     self.end_headers()
>> >> >   File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/api.py",
>> line 476, in end_headers
>> >> >     self._write = self._start_response(self._status,
>> self._outheaders)
>> >> > RuntimeError: headers have already been sent
>> >> >
>> >> > Above chunk is the error. And below is how I write my json response
>> to the AJAX call.
>> >> >     def respond(self, req, data, code=200):
>> >> >         """Respond to the JSON request by sending the JSON-encoded
>> data back."""
>> >> >         json_data = json.dumps(data)
>> >> >         req.send_response(code)
>> >> >         req.send_header('Content-Type', 'application/json')
>> >> >         req.send_header('Content-Length', len(json_data))
>> >> >         req.write(json_data)
>> >> >         raise RequestDone
>> >> >
>> >> > Not sure if I am missing any code here in this respond method.
>> Welcome your suggestions to fix this error.
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Jun Omae <[email protected]> (大前 潤)
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Trac Users" group.
>>
> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to [email protected].
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/trac-users/a6858f6d-fe2e-491b-ab23-f399fc2ebe2d%40googlegroups.com.
>>
>>
>>
>>
>> --
>> Jun Omae <[email protected]> (大前 潤)
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/9f21c412-8ff3-4384-b3ae-4339c8be6f14%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/9f21c412-8ff3-4384-b3ae-4339c8be6f14%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Jun Omae <[email protected]> (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMagRrEM5ypgSwOO5sAucgP4SQSp8WrVcK%3Dpu2Fn-bmHXtw%40mail.gmail.com.

Reply via email to