tags:

views:

62

answers:

1

If anyone could help me with the problem I'm having I would be one happy programmer. I'm working on an e-commerce site that is having trouble authenticating with the gateway. This problem just start randomly on a site that had been working for years. This suggest to me that either the host made a change / update to it's PHP configuration or some other configuration setting was changed by the client.

Here is an image of the problem in Fiddler: alt text

You can see in the areas I have in a red box the values have extra characters (i.e. instead of just "59.00" it is "59.00\n73\n". I have no clue where these extra characters are coming from. The previous page (order preview) uses the same values and they display fine; however, this final page (confirm order) has the extra crap.

Any ideas?

For those that wanted it, here is the code in a nutshell:

Here is the code

on the order preview page you have the following in a form using POST:

<input type="hidden" name="CCType" value="VISA">

and the on the order confirm page (the page you see in fiddler above):

$CCType = $HTTP_POST_VARS['CCType'];
<INPUT TYPE="HIDDEN" NAME="x_Card_Type" VALUE="<?=trim($CCType)?>">

basically, page 1 says variable = value. The variable then moves to page 2 via the post and page 2 outputs the value stored in the variable.

I see the answer posted below and I'll investigate that.

+5  A: 

This is Chunked Transfer Encoding. It's part of HTTP 1.1 protocol (you can find such bytes on other sites). This numbers tell browser how many bytes will be sent in next chunk of data. You'll never see them on page.

You don't need to warry about it. Just click on yellow line in Fidder saying "Responce is encoded... Click here is transform." If you have "Show Toolbar" enabled in Fidder menu, then click on "AutoDecode" button, which will make Fiddler to decode it automatically.

Ivan Nevostruev
That is indeed it... that's what I get for not knowing how to properly use the tool. Unfortunately that means I'm barking up the wrong tree.
mlindegarde