756 Too long request string

341 views
Skip to first unread message

Michael Darling

unread,
May 22, 2014, 9:32:03 PM5/22/14
to etsy-...@googlegroups.com
Made a call to updateListing


OAuth is provided in headers, so those are left out.

Here's the data being sent:
category_id=68925800&description=Photograph on Canvas, Titled: San Diego Reflecting Pond Downtown Skyline at Night)\r\nTaken By: Rufustelestrat\r\nDated: November 7, 2006\r\n\r\n\r\n\r\nCANVAS TYPE - BETTER GICLEE\r\n\r\n* Every giclee maker is going to say they use the finest materials available!  However, you have to look to see if they actually say what canvas they use.  Most don't.  And, the fact is most of them use standard grade canvas, such as Espon, HP, or Canon.  Many of them even use economy grade canvas, imported from no-name brands.  If they don't explain whose "premium" canvas they're using, and if the industry doesn't hold that brand in high regard, the fact is they aren't really using premium canvas.\r\n\r\n* I use Breathing Color Crystalline canvas.  Used by high end enthusiasts.  Doesn't contain OBA chemicals (optical brightener additives) like standard canvas, so is more "archival" than canvases advertised as "archival".  Displays more vibrant colors and is more durable than standard canvas.\r\n\r\n\r\n\r\nABOUT MY GICLEE PROCESS\r\n\r\n* Best Equipment - I use the most advanced Giclee printer available, the Epson Stylus Pro 9900\r\n\r\n* Archival - Newest and most archival ink set (Epson UltraChrome HDR.)  Independently rated not to noticeably fade for up to 200 years.\r\n\r\n* Durable - Coated with varnish, increasing durability and resistance to UV light fading, water, and scratches.\r\n\r\n\r\n\r\nREADY FOR FRAMING (NO GLASS NEEDED) OR STRETCHING\r\n\r\n* Custom Prepared For You - If you're going to have the piece stretched, we'll discuss what you'd like the extra borders to look like (solid color, mirror effect, soft color fade), and how much extra canvas you need on the sides for stretching.\r\n\r\n* Frame It Without Glass - With its protective canvas varnish, you can safely frame this piece without glass.  See the piece without the interference of glass, and save money!\r\n\r\n* Stretch It - You or your local framer can stretch the piece on stretcher bars, and no frame is needed, unless you want one.  (Or, I can ship it stretched - inquire about rates.)\r\n\r\n\r\n\r\nSHIPPING\r\n\r\n* FREE Priority Mail\r\n\r\n* About 3 Days to Ship - I make the canvas specially for YOU.  I print it right away, let it dry for a day, spray the varnish on it, let it dry for a day, and ship it.  If you're in a rush, you can have me make and ship it quicker, but it won't be as durable.  It takes up a lot of room and time to allow each canvas to go through this rigorous process, but your product is worth it!\r\n\r\n* Only US - Sorry, no international sales at this time.\r\n\r\n\r\n\r\nTERMS OF SALE\r\n\r\n* I make each canvas specially for each order, so they are non-returnable.  (Of course, if something is wrong with it, I'll exchange it!)&is_customizable=true&is_supply=false&listing_id=190509815&materials=canvas,ink,canvas varnish&processing_max=3&processing_min=1&shipping_template_id=3444306184&state=draft&style=photo,&tags=san diego,skyline,downtown,reflecting pond,water,reflection,night,san,diego&title=San Diego Reflecting Pond Downtown Skyline at Night Photograph Canvas Giclee&when_made=made_to_order&who_made=i_did

I get back:

HTTP/1.1 756 Too long request string
Date: Fri, 23 May 2014 01:20:18 GMT
Server: Varnish
Retry-After: 0
Content-Type: text/html; charset=utf-8
Content-Length: 430
Accept-Ranges: bytes
Via: 1.1 varnish

With:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>756 Too long request string</title>
  </head>
  <body>
    <h1>Error 756 Too long request string</h1>
    <p>Too long request string</p>
    <h3>Guru Meditation:</h3>
    <p>XID: 141644658</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>


So, through a web browser I can put in that long of a description, and I can use that many newlines.  If I do that and call getListing, I found etsy is treating each newline as a "\r\n", so that's how I built it to transmit through the API.

What's going on?<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html>
  <head>
    <title>756 Too long request string</title>
  </head>
  <body>
    <h1>Error 756 Too long request string</h1>
    <p>Too long request string</p>
    <h3>Guru Meditation:</h3>
    <p>XID: 141644658</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>

Michael Darling

unread,
May 22, 2014, 10:17:28 PM5/22/14
to etsy-...@googlegroups.com
I did get past this, but I'd LOVE to hear from an Etsy developer still.

I have a lot of experience with POST & GET, but have never used PUT or DELETE before.  I'm using libcurl (c/c++ http library).  When I implemented DELETE for the Etsy API, I used CURLOPT_CUSTOMREQUEST "DELETE" and passed the "data" as a GET-style, by having the URL be in the form base+"?"+data.  That's how a libcurl example I saw using DELETE worked, rather than sending it as a POST-style, by having the URL be just itself.  Etsy accepted that just fine.

So, when I tried implementing PUT, I used the same method -- putting the data as URL parameters.

If I change this so I'm instead sending the data as a POST-style, it works just fine.

So, the reason I'd love to hear from an Etsy developer is:

* Is there an Etsy preference on whether to pass data as URL parameters (GET-style) when doing a DELETE or PUT, or as posted fields (POST-style)?  After reading about varying max URL sizes in different browsers and on different servers, I now have a preference to use a POST-style for everything but GET's.
* Even so, perhaps Etsy's API's maximum URL size should be bumped up a bit.  Seems quite low right now.

Graeme Grant

unread,
May 22, 2014, 10:11:00 PM5/22/14
to EtsyAPI Forum, darl...@gmail.com
You need to POST/PUT changes in the body and GET/DELETE only in the URL.
 
G.

 

Date: Thu, 22 May 2014 18:32:03 -0700
From: darl...@gmail.com
To: etsy-...@googlegroups.com
Subject: 756 Too long request string
--
You received this message because you are subscribed to the Google Groups "Etsy API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etsy-api-v2...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Graeme Grant

unread,
May 23, 2014, 7:29:00 AM5/23/14
to EtsyAPI Forum, darl...@gmail.com
I think that they're looking at it from the perspective what is the worst-case mobile/desktop url length and setting that as the limit.
 
The fact is that the limit is there and if the possibility exists that you can hit the limit, then the best-case scenario is to use the most reliable method.
 
G.

 

Date: Thu, 22 May 2014 19:17:28 -0700
From: darl...@gmail.com
To: etsy-...@googlegroups.com
Subject: Re: 756 Too long request string
Reply all
Reply to author
Forward
0 new messages