Loading documents with plus signs in their Ids when using IIS

17 views
Skip to first unread message

Chris Mondok

unread,
Aug 20, 2014, 10:02:16 AM8/20/14
to rav...@googlegroups.com
I apologize if this question has been asked before, but I couldn't find much information about what constitutes a valid document Id online. All I was able to find is that document Ids can't contain a '\', nor can they be longer than 1023 characters.

That said, we have run into trouble where when storing a document with a plus sign '+' in the document. When using the C# API, we can store the document, but cannot load it. When using the HTTP api (via curl), we can't save the document. This issue only seems to present itself when running RavenDB in IIS. When it is installed as a Windows service, everything works just fine. We've had this issue for months, but the latest version we've seen it on is #2910. 

Is this a bug? A known limitation? Should we disallow the '+' character in document Ids? If so, are there other characters we're missing? Is there something that we can configure in IIS to make it work? Any help is appreciated.

In the following example, both servers are running version 2908:

[cmondok@MDS-D77GDS1 ~]$ SERVICE_SERVER=http://localhost:8080
[cmondok@MDS-D77GDS1 ~]$ IIS_SERVER=http://ngp-dev-db:8080
[cmondok@MDS-D77GDS1 ~]$ 
[cmondok@MDS-D77GDS1 ~]$ curl -X PUT $SERVICE_SERVER/databases/sandbox/docs/test+document -d '{"Hello":"World" }'
{"Key":"test+document","ETag":"01000000-0000-0001-0000-000000000002"}
[cmondok@MDS-D77GDS1 ~]$ curl $SERVICE_SERVER/databases/sandbox/docs/test+document
{"Hello":"World"}
[cmondok@MDS-D77GDS1 ~]$ curl -X PUT $IIS_SERVER/databases/sandbox/docs/test+document -d '{"Hello":"World"}'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>404 - File or directory not found.</h2>
  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
 </fieldset></div>
</div>
</body>
</html>
[cmondok@MDS-D77GDS1 ~]$

Thanks!

Oren Eini (Ayende Rahien)

unread,
Aug 20, 2014, 10:06:59 AM8/20/14
to ravendb
IIRC, you need to configure IIS for this.

See: allowDoubleEscaping



Oren Eini

CEO


Mobile: + 972-52-548-6969

Office:  + 972-4-622-7811

Fax:      + 972-153-4622-7811





--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Mondok

unread,
Aug 20, 2014, 10:25:34 AM8/20/14
to rav...@googlegroups.com
Perfect! Enabling allowDoubleEscaping fixed the problem.

Thanks!
Reply all
Reply to author
Forward
0 new messages