0

I'm reeealy stuck and way over my head. I've got a e-commerce site set up with woocommerce and realex (the merchant company). I'm having problems with the response URL, it is being denied when programmatic (non user-agent) requests are being made.

try: $ wget curl http://fifty2printsolutions.com/?wc-api=WC_Gateway_Realex_Redirect

But when you set a valid user agent:

try: $ curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" http://fifty2printsolutions.com/?wc-api=WC_Gateway_Realex_Redirect

it works.

This points to a server configuration issue, it seems like programmatic (non user-agent) requests are being denied by his server with a 406 response. At least this is what the extension author has told me

How can I got about fixing this? I'm with host papa, the support is a bit lack luster.

Any help would be greatly appreciated.

1 Answers1

0

I think you might be dealing with an Apache mod_security issue here. From my experimentation, as long as I have something in the User-Agent, it will process ok. However, if I include the words libwww or perl in the User-Agent, or leave it blank, it doesn't work.

Realex Epage Redirect uses "epage.cgi / libwww-perl" (or similar, I don't have it in front of me) as the User-Agent. This hits both of those rules, so it is getting blocked. We've come across this before and the only solution is to ask the administrators of the site to modify the mod_security rules to allow this. We once changed the User-Agent string to something else, but incredibly, several shopping carts suddenly stopped working and we had to roll the change out.

Hope this helps

Owen

Owen O Byrne
  • 417
  • 3
  • 10