Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Issue with HEAD HTTP request

tdeblocktdeblock Members
edited January 2015 in Sahi - Open Source

I have an critical issue with Sahi. My application use HEAD HTTP request to know if I can do Ajax request.
Without sahi, all is ok.
But when i activate sahi ajax call is not do.

I have found why. It's because when a HEAD HTTP query is do sahi return a mocked header repsponse, not the header retourned by the server.

This is the header when sahi is not running :
This is the header when sahi is running :

I have correct the issue. For that I have update the net.sf.sahi.request.HttpRequest class :
- I have add a method :
public boolean isHead() {
return "head".equalsIgnoreCase(method());
- i have update the if line 86 :
before :
if (isPost() || isGet() || isPut() || isDelete() || isConnect()) {
if (isPost() || isGet() || isPut() || isDelete() || isConnect() || isHead()) {

My correction is do on the v5 release.


Sign In or Register to comment.