W3C home > Mailing lists > Public > uri@w3.org > October 2002

RFC 2396 and SMB URLs

From: Michael B. Allen <miallen@eskimo.com>
Date: Tue, 8 Oct 2002 02:42:28 -0400
To: uri@w3.org
Message-Id: <20021008024228.77fb008a.miallen@eskimo.com>

I've  been working with a guy doing an SMB URL IETF draft because my client
uses  it.  SMB is MS's file and printer sharing protocol (e.g. net use, Map
network  drive ...). I have a problem and I was hoping your experience with
HTTP URLs might help us. 

We  want  to use a URL like 'smb://' to denote the top of the network which
would  be  used  exclusively to list workgroups. Listing 'smb://WORKGROUP/'
will  list  all servers that are members of that workgroup. Other than that
these SMB URLs are like most others:


My  problem  is that my Java client uses the standard java.net.URL class to
parse  URLs  which parses everything ok except for these top level 'smb://'
URLs  and URLs composed from 'smb://' as a context URL and a relative path.
For example: 

  smb://                --> smb:
  smb:// + WORKGROUP/   --> smb:/WORKGROUP/
  smb:// + //WORKGROUP/ --> smb://WORKGROUP/
  smb:////              --> smb://

You  can  see that this breaks our current model a bit. If a user creates a
URL with 'smb://' the various java.net.URL.getXxx methods return: 

          port: 139
         query: null
           ref: null
      userinfo: null
  externalform: smb:
        string: smb:

I  can  override  the arguments so that passing 'WORKGROUP/' is substituted
with '//WORKGROUP/' before passing it to the default parser. That works ok,
and  makes  sense. I can trap the 'smb://' case and pass 'smb:////' too but
this gives: 

          file: //
          port: 139
          path: //
         query: null
           ref: null
      userinfo: null
  externalform: smb://
        string: smb://

As  you  can  see  this  hack makes the file and path '//' which makes less
sense  to  me.  Does  this  behavior agree with RFC 2396? I find it hard to
believe  Sun got it wrong. If java.net.URL is right then what should proper
semantics be for a URL like this? 

Any help would be greatly appreciated,

A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 
Received on Tuesday, 8 October 2002 02:38:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:04 UTC