Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 53605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:05:22+00:00 2026-05-10T17:05:22+00:00

A WebDAV library I’m using is issuing this request MKCOL /collection HTTP/1.1 To which

  • 0

A WebDAV library I’m using is issuing this request

 MKCOL /collection HTTP/1.1 

To which apache is issuing a 301 because /collection exists

 HTTP/1.1 301 Location: /collection/ 

Rather than a

 HTTP/1.1 405 Method Not Allowed 

The spec is a bit vague on this (or it could be my reading of it), but when issuing an MKCOL, should the name of your collection always end with a slash (as it is a collection) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:05:23+00:00Added an answer on May 10, 2026 at 5:05 pm

    HTTP Code 301 means ‘Moved Permanently’ as you know.

    Apache is graciously redirecting you to the proper URL. It can’t give you a 405 because no resource exists with the URL you provided. But it can’t create the resource with that exact URL either. What it can do is create the resource with the proper URL then redirect you.

    But to answer your question, you should end collections with ‘/’ to remove ambiguity, otherwise the resulting URI normalization behavior is up to the server I believe. I don’t believe adding that trailing slash is mandated by any RFC.

    EDIT:

    The MKCOL may succeed without the trailing slash, but notice that the resource reported created has a trailing slash.

    The server has an option, according to the RFC. Since it determines the URL normalization procedure as long as it doesn’t violate the spec.

    The server then can either try to normalize ever URL you send it’s way on every operation, returning lots of 3xx codes. This gets expensive. Or it can correct you in the beginning ( POST, MKCOL, etc. ) then fail or redirect after that.

    But the key point is that it will always let you know the URL it prefers.

    Something on HTTP URL Scheme from RFC 2616

    3.2.3 URI Comparison

    When comparing two URIs to decide if they match or not, a client
    SHOULD use a case-sensitive octet-by-octet comparison of the entire URIs, with these exceptions:

      - A port that is empty or not given is equivalent to the default     port for that URI-reference;      - Comparisons of host names MUST be case-insensitive;      - Comparisons of scheme names MUST be case-insensitive;      - An empty abs_path is equivalent to an abs_path of '/'. 

    Characters other than those in the ‘reserved’ and ‘unsafe’ sets (see
    RFC 2396 [42]) are equivalent to their ”%’ HEX HEX’ encoding.

    For example, the following three URIs are equivalent:

      http://abc.com:80/~smith/home.html   http://ABC.com/%7Esmith/home.html   http://ABC.com:/%7esmith/home.html 

    Notice no mention on how abs_path is defined. Also the server can’t strictly speaking ignore your slash either according to the spec. So, issuing a ‘MKCOL /collection’ and getting a regular 2xx created with no new ‘/collection/’ URL is incorrect.

    AFAIK, related RFCs that define abs_path do not specify the trailing slash. So it’s up to the server on how it compares and normalizes those.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 112k
  • Answers 112k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer TDD -- write the tests first, forces you to think… May 11, 2026 at 9:53 pm
  • Editorial Team
    Editorial Team added an answer You've almost got it; you just need to use lookarounds… May 11, 2026 at 9:53 pm
  • Editorial Team
    Editorial Team added an answer The default in Django is not the same as SQL… May 11, 2026 at 9:53 pm

Related Questions

A WebDAV library I'm using is issuing this request MKCOL /collection HTTP/1.1 To which
Is there any class, library or some piece of code which will help me
What is the best way to upload a file to a Document Library on
I was wondering if anyone knows how to or if it is possible to
I am a .NET webdev using ASP.NET, C# etc... I learned javascript in college

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.