Commit Graph

24 Commits

Author SHA1 Message Date
Dennis Heimbigner
40013b72f6 The pr does some cleanup on the internal documentation
in the docs directory.
1. Add a new internal document -- testserver.dox -- to describe
   how to set up and maintain the dap test server.
2. It moves the internal documentation (internal.dox, indexing.dox,
   and testserver.dox) to later in the documentation table of contents.
3. Cleanup the formatting of the internal documents.
4. Cleanup some minor doxygen issues in other files.
2018-06-29 15:06:27 -06:00
Dennis Heimbigner
9aa1e9a14e master merge 2018-05-03 21:02:12 -06:00
luz.paz
74fbacdb82 Misc. source comment typos
Some are user-facing. Found via `codespell` and through the downstream FreeCAD.
2018-04-26 23:04:01 -04:00
Dennis Heimbigner
ccc70d640b re: esupport MQO-415619
and https://github.com/Unidata/netcdf-c/issues/708

Expand the NC_INMEMORY capabilities to support writing and accessing
the final modified memory.

Three new functions have been added:
nc_open_memio, nc_create_mem, and nc_close_memio.

The following new capabilities were added.
1. nc_open_memio() allows the NC_WRITE mode flag
   so a chunk of memory can be passed in and be modified
2. nc_create_mem() allows the NC_INMEMORY flag to be set
   to cause the created file to be kept in memory.
3. nc_close_mem() allows the final in-memory contents to be
   retrieved at the time the file is closed.
4. A special flag, NC_MEMIO_LOCK, is provided to ensure that
   the provided memory will not be freed or reallocated.

Note the following.
1. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is not set,
   then the netcdf-c library will take control of the incoming memory.
   This means that the original memory block should not be freed
   but the block returned by nc_close_mem() must be freed.
2. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is set,
   then modifications to the original memory may fail if the space available
   is insufficient.

Documentation is provided in the file docs/inmemory.md.
A test case is provided: nc_test/tst_inmemory.c driven by
nc_test/run_inmemory.sh

WARNING: changes were made to the dispatch table for
the close entry. From int (*close)(int) to int (*close)(int,void*).
2018-02-25 21:45:31 -07:00
Dennis Heimbigner
8cb1fc4cfe This is the second step in refactoring the libsrc4 code.
The first was branch newhash0.dmh.

As with newhash0.dmh, these changes should be transparent.
2018-02-24 20:36:24 -07:00
Dennis Heimbigner
9935d54fdf Merge master and resolve conflicts 2017-10-28 13:57:23 -06:00
Dennis Heimbigner
a2e0f069ec This pr should probably be delayed until after Version 4.5.
Primary change is to cleanup code and remove duplicated code.

1. Unify the rc file reading into libdispatch/drc.c. Eventually extend
   if we need rc file for netcdf itself as opposed to the dap code.
2. Unify the extraction from the rc file of DAP authorization info.
3. Misc. other small unifications: make temp file, read file.
4. Avoid use of libcurl when reading file:// because
   there is some kind of problem with the Visual Studio version.
   Might be related to the winpath problem.
   In any case, do direct read instead.
5. Add new error code NC_ERCFILE for errors in reading RC file.
6. Complete documentation cleanup as indicated in this comment
   https://github.com/Unidata/netcdf-c/pull/472#issuecomment-325926426
7. Convert some occurrences of #ifdef _WIN32 to #ifdef _MSC_VER
2017-09-02 18:09:36 -06:00
Dennis Heimbigner
8e2abdeed8 Initial version 2017-08-31 14:19:56 -06:00
Dennis Heimbigner
95f697f216 Clarify documentation 2017-08-30 19:21:30 -06:00
Dennis Heimbigner
15db0f15ea Clarify rc documentation 2017-08-30 12:05:04 -06:00
Dennis Heimbigner
bc9e41ae2b 1. Fix bug in ocrc.c#combinecredentials where a null user+pwd
generates garbage. This in turn interferes with using .netrc
because the garbage user+pwd can will override the
.netrc. Note that this may work ok sometimes
if the garbage happens to start with a nul character.

2. It turns out that the user:pwd combination needs to support
character escaping. One reason is the user may contain an '@' character.
The other is that modern password rules make it not unlikely that
the password will contain characters that interfere with url parsing.
So, the rule I have implemented is that all occurrences of the user:pwd
format must escape any dodgy characters. The escape format is URL escaping
of the form %XX. This applies both to user:pwd
embedded in a URL as well as the use of HTTP.CREDENTIALS.USERPASSWORD
in a .dodsrc/.daprc file. The user and password in .netrc must not
be escaped. This is now documented in docs/auth.md

The fix for #2 actually obviated #1. Now, internally, the user and pwd
are stored separately and not in the user:pwd format. They are combined
(and escaped) only when needed.
2017-08-29 14:11:15 -06:00
Dennis Heimbigner
e226cc731e Add note about .daprc vs .dodsrc 2017-08-28 15:50:33 -06:00
Dennis Heimbigner
37834917e9 Fix up documentation to replace old auth documentation
with a revised auth.md document.
2017-08-20 18:27:48 -06:00
dmh
7480d7d97d - clean up the dfile.c confusion about NC_64_BIT_OFFSET
- sync oc2 with  master for https://DennisHeimbigner@github.com/Unidata/oc.git
- Cleanup auth.html documentation.
- Cleanup obsolete documentation.
2015-10-24 21:45:13 -06:00
Ward Fisher
67c09af90e Refactor auth to oc_auth. 2015-06-04 15:12:30 -06:00
Ward Fisher
26a157f703 Converted ocauth.html to markdown with Pandoc. 2015-06-03 15:48:14 -06:00
Ward Fisher
76e85a9c76 Working on cleaning up the auth.md file. 2015-06-03 15:15:00 -06:00
dmh
be5e3cd606 1. Allow for the user specified rc file via the env variable
DAPRCFILE.  Note that the value of this environment
   variable should be the absolute path of the rc file, not
   the path to its containing directory.
2. fixup testauth.sh and add some new tests
3. synch oc
2015-05-24 17:31:39 -06:00
Ward Fisher
078013c0d1 Corrected an undefined reference warning in install.md 2015-04-23 15:42:41 -06:00
Ward Fisher
b44b687f4b Modified auth.md to remove a bunch of warnings. 2015-04-23 15:40:19 -06:00
dmh
8673e66640 A couple of docs/ .dox files have apparently
been converted to .md.
2015-04-16 16:44:51 -06:00
Ward Fisher
b6d24186d9 Formated auth.md to remove the bevy of format warnings included. Moved it to a sub-section of the NetCDF User's Guide, until a better place for it is found. It seems like we should have a DAP-related page/documentation group. 2015-03-12 11:08:23 -06:00
dmh
06a11e51df 1. Allow for the user specified rc file via the env variable
NCRCFILE.  Note that the value of this environment
   variable should be the absolute path of the rc file, not
   the path to its containing directory.
2015-03-03 20:17:27 -07:00
dmh
88f1ac820c 1. synch with oc lib
2. update to add docs/auth.md
2015-03-02 20:26:39 -07:00