-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"PHP Warning: DOMDocument::loadXML()" when sending very looooooong fields #54
Comments
So looked and we only store 255 character first and last names. We don't document that on http://docs.recurly.com/api/accounts, which is an oversight that I'll bring up with the team. I ran your sample code locally and it created a an account for me but truncated the name down 255 characters (so only "Laurent"s). Can you provide any additional detail that would help me reproduce this? |
Yep sorry. My example indeed works. |
Great, seeing it now. I'll dig into this. |
It was brought to my attention that we do document the lengths on http://docs.recurly.com/api/accounts#create-account I'm curious why we're not able to throw an accurate error though. |
I investigated myself and the issue is that the server send 2 headers :
which is the expected behavior as the data length is too long to be sent in a single shot. list($header, $body) = explode("\r\n\r\n", $response, 2); It gets the 201 headers instead of the xml body. |
Yeah as you noted we actually enforce the limit in the UI but not on the API. So that's one issue. The long/error response parsing seems to be another. I tried running the longer version against an instance of the API on my laptop and didn't have any issue so I think it might be some rewriting by our load balancer or proxy. We could probably add some work around code to the client but I'm not sure that's the right fix. |
I agree. My "fix" is more a workaround than anything else. |
I'd totally forgotten about this issue but we finally addressed in in #88. |
Hi,
When creating an account with really long fields value, I get the following error :
Here's the code I used :
The text was updated successfully, but these errors were encountered: