anchor.diff:              design_doc_spatial_loop(Req, Db, DDocId, SpatialName, Attempt - 1)
       end.
   
  -handle_spatial_req(Req, Db, DDoc) when Db#db.filepath =/= undefined ->
  +handle_spatial(Req, Db, DDoc) when Db#db.filepath =/= undefined ->
       couch_httpd_spatial:handle_spatial_req(Req, Db, DDoc);
   
  -handle_spatial_req(#httpd{method='GET',
  -                          path_parts=[_, _, DName, _, SpatialName]}=Req, #db{name=Name} = Db,
  -                   _DDoc) ->
  +handle_spatial(#httpd{method='GET',
  +                      path_parts=[_, _, DName, _, SpatialName]}=Req, #db{name=Name} = Db,
  +               _DDoc) ->
       case capi_view:run_on_subset(Req, Name) of
           full_set ->
               design_doc_spatial(Req, Db, DName, SpatialName);
  
positive.code: 
  -define(RETRY_INTERVAL, 5 * 1000).
  -define(RETRY_ATTEMPTS, 20).
  
  design_doc_spatial(Req, #db{name=BucketName} = Db, DesignName, SpatialName,
                     VBuckets) ->
  
negative.code:             design_doc_spatial(Req, Db, DName, SpatialName, [VBucket])
      end;
  
  handle_spatial(#httpd{method='POST',
                        path_parts=[_, _, DName, _, SpatialName]}=Req, Db, _DDoc) ->
      couch_httpd:validate_ctype(Req, "application/json"),
      design_doc_spatial(Req, Db, DName, SpatialName);
  
  handle_spatial(Req, _Db, _DDoc) ->
      couch_httpd:send_method_not_allowed(Req, "GET,POST,HEAD").
  
  
  